mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-03-04 16:41:43 +00:00
libclang/CXLoadedDiagnostic.cpp: Work around not to miss the string terminator on fixit.
FixIts might be exposed as C string via clang_getCString(), though the zero terminator is not allocated in CXLoadedDiagnosticSetImpl::makeString. llvm-svn: 144379
This commit is contained in:
parent
3ba71043dc
commit
e89c3bd004
@ -18,6 +18,6 @@ void bar() {
|
||||
// CHECK: {{.*[/\\]}}serialized-diags.c:3:12: warning: variable 'voodoo' is uninitialized when used here [-Wuninitialized]
|
||||
// CHECK: Range: {{.*[/\\]}}serialized-diags.c:3:12 {{.*[/\\]}}serialized-diags.c:3:18
|
||||
// CHECK: +-{{.*[/\\]}}serialized-diags.c:2:13: note: initialize the variable 'voodoo' to silence this warning []
|
||||
// CHECK: +-FIXIT: ({{.*[/\\]}}serialized-diags.c:2:13 - {{.*[/\\]}}serialized-diags.c:2:13): " = 0Parse Issueexpected ';' after expression"
|
||||
// CHECK: +-FIXIT: ({{.*[/\\]}}serialized-diags.c:2:13 - {{.*[/\\]}}serialized-diags.c:2:13): " = 0"
|
||||
// CHECK: {{.*[/\\]}}serialized-diags.c:8:22: error: expected ';' after expression []
|
||||
// CHECK: FIXIT: ({{.*[/\\]}}serialized-diags.c:8:22 - {{.*[/\\]}}serialized-diags.c:8:22): ";"
|
||||
|
@ -626,7 +626,7 @@ LoadResult DiagLoader::readDiagnosticBlock(llvm::BitstreamCursor &Stream,
|
||||
llvm::StringRef RetStr;
|
||||
if (readString(TopDiags, RetStr, "FIXIT", Record, BlobStart, BlobLen))
|
||||
return Failure;
|
||||
D->FixIts.push_back(std::make_pair(SR, createCXString(RetStr, false)));
|
||||
D->FixIts.push_back(std::make_pair(SR, createCXString(RetStr)));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user