summaryrefslogtreecommitdiff
path: root/include/clang/Basic/DiagnosticFrontendKinds.td
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@google.com>2014-05-08 13:49:54 +0000
committerDiego Novillo <dnovillo@google.com>2014-05-08 13:49:54 +0000
commit459bb10b61a5492e2840993d73905b97ca3375ed (patch)
treeca4f8340390202f8dd051c6962b9f08919fa44fb /include/clang/Basic/DiagnosticFrontendKinds.td
parentc52c190c1e790317e6448902fbf08511fb6c1789 (diff)
downloadclang-459bb10b61a5492e2840993d73905b97ca3375ed.tar.gz
clang-459bb10b61a5492e2840993d73905b97ca3375ed.tar.bz2
clang-459bb10b61a5492e2840993d73905b97ca3375ed.tar.xz
Fix segmentation fault when mixing -Rpass with #line.
Summary: When using #line directives, FileManager::getFile() will return a nil entry. This triggers an assert in translateFileLineCol(). This patch handles nil FileEntry instances by emitting a note that the location could not be translated back to a SourceLocation. I don't really like this solution, but we are translating presumed locations, so some information has already been lost. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3625 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208315 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/DiagnosticFrontendKinds.td')
-rw-r--r--include/clang/Basic/DiagnosticFrontendKinds.td2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticFrontendKinds.td b/include/clang/Basic/DiagnosticFrontendKinds.td
index 674d6d6c42..8fd77aef88 100644
--- a/include/clang/Basic/DiagnosticFrontendKinds.td
+++ b/include/clang/Basic/DiagnosticFrontendKinds.td
@@ -37,6 +37,8 @@ def remark_fe_backend_optimization_remark : Remark<"%0">, CatBackend,
def note_fe_backend_optimization_remark_missing_loc : Note<"use "
"-gline-tables-only -gcolumn-info to track source location information "
"for this optimization remark">;
+def note_fe_backend_optimization_remark_invalid_loc : Note<"could "
+ "not determine the original source location for %0:%1:%2">;
def err_fe_invalid_code_complete_file : Error<
"cannot locate code-completion file %0">, DefaultFatal;