forked from OSchip/llvm-project
[libclang] Pass in the -fallow-editor-placeholders option
This will suppress any live diagnostics caused by editor placeholders in Xcode. rdar://31833579 llvm-svn: 301542
This commit is contained in:
parent
fbdaac4841
commit
cb00640c05
|
@ -266,7 +266,8 @@ LANGOPT(SanitizeAddressFieldPadding, 2, 0, "controls how aggressive is ASan "
|
|||
|
||||
LANGOPT(XRayInstrument, 1, 0, "controls whether to do XRay instrumentation")
|
||||
|
||||
LANGOPT(AllowEditorPlaceholders, 1, 0, "allow editor placeholders in source")
|
||||
BENIGN_LANGOPT(AllowEditorPlaceholders, 1, 0,
|
||||
"allow editor placeholders in source")
|
||||
|
||||
#undef LANGOPT
|
||||
#undef COMPATIBLE_LANGOPT
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
// RUN: c-index-test -test-load-source all %s 2>&1 | FileCheck %s
|
||||
|
||||
<#placeholder#>;
|
||||
|
||||
// CHECK-NOT: error
|
|
@ -3371,7 +3371,10 @@ clang_parseTranslationUnit_Impl(CXIndex CIdx, const char *source_filename,
|
|||
Args->push_back("-Xclang");
|
||||
Args->push_back("-detailed-preprocessing-record");
|
||||
}
|
||||
|
||||
|
||||
// Suppress any editor placeholder diagnostics.
|
||||
Args->push_back("-fallow-editor-placeholders");
|
||||
|
||||
unsigned NumErrors = Diags->getClient()->getNumErrors();
|
||||
std::unique_ptr<ASTUnit> ErrUnit;
|
||||
// Unless the user specified that they want the preamble on the first parse
|
||||
|
|
Loading…
Reference in New Issue