diff options
Diffstat (limited to 'include/clang/Frontend/CompilerInvocation.h')
-rw-r--r-- | include/clang/Frontend/CompilerInvocation.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/include/clang/Frontend/CompilerInvocation.h b/include/clang/Frontend/CompilerInvocation.h index 413134be4cef0..f3253d5b40e3c 100644 --- a/include/clang/Frontend/CompilerInvocation.h +++ b/include/clang/Frontend/CompilerInvocation.h @@ -14,13 +14,14 @@ #include "clang/Basic/FileSystemOptions.h" #include "clang/Basic/LLVM.h" #include "clang/Basic/LangOptions.h" +#include "clang/Basic/LangStandard.h" #include "clang/Frontend/DependencyOutputOptions.h" #include "clang/Frontend/FrontendOptions.h" -#include "clang/Frontend/LangStandard.h" #include "clang/Frontend/MigratorOptions.h" #include "clang/Frontend/PreprocessorOutputOptions.h" #include "clang/StaticAnalyzer/Core/AnalyzerOptions.h" #include "llvm/ADT/IntrusiveRefCntPtr.h" +#include "llvm/ADT/ArrayRef.h" #include <memory> #include <string> @@ -147,13 +148,14 @@ public: /// Create a compiler invocation from a list of input options. /// \returns true on success. /// + /// \returns false if an error was encountered while parsing the arguments + /// and attempts to recover and continue parsing the rest of the arguments. + /// The recovery is best-effort and only guarantees that \p Res will end up in + /// one of the vaild-to-access (albeit arbitrary) states. + /// /// \param [out] Res - The resulting invocation. - /// \param ArgBegin - The first element in the argument vector. - /// \param ArgEnd - The last element in the argument vector. - /// \param Diags - The diagnostic engine to use for errors. static bool CreateFromArgs(CompilerInvocation &Res, - const char* const *ArgBegin, - const char* const *ArgEnd, + ArrayRef<const char *> CommandLineArgs, DiagnosticsEngine &Diags); /// Get the directory where the compiler headers |