summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
Commit message (Collapse)AuthorAgeFilesLines
...
* Use a .def file for most of the diagnostic options.Douglas Gregor2012-10-233-11/+10
| | | | llvm-svn: 166520
* Make DiagnosticOptions intrusively reference-counted, and make sureDouglas Gregor2012-10-2312-83/+88
| | | | | | | the various stakeholders bump up the reference count. In particular, the diagnostics engine now keeps the DiagnosticOptions object alive. llvm-svn: 166508
* Switch CodeGenOptions over to a .def file, like we do with LangOptions.Douglas Gregor2012-10-231-12/+16
| | | | llvm-svn: 166497
* If the precompiled header named by "-include" is actually a directory,Douglas Gregor2012-10-232-11/+45
| | | | | | | | | check each of the files within that directory to determine if any of them is an AST file that matches the language and target options. If so, the first matching AST file is loaded. This fixes a longstanding discrepency with GCC's precompiled header implementation. llvm-svn: 166469
* Handle implicitly-included PCH files the same way asDouglas Gregor2012-10-222-10/+17
| | | | | | | | implicitly-included PTH files during initialization, delaying the mapping down to the "original source file" until after later in the initialization process. llvm-svn: 166452
* Allow clients of the AST reader to specify what kinds of AST loadDouglas Gregor2012-10-223-7/+14
| | | | | | | | | | failures they know how to tolerate, e.g., out-of-date input files or configuration/version mismatches. Suppress the corresponding diagnostics if the client can handle it. No clients actually use this functionality, yet. llvm-svn: 166449
* Distinguish the various kinds of AST file loading failures:Douglas Gregor2012-10-223-4/+16
| | | | | | | | file corruption, compiler version mismatch, target/language configuration mismatch, out-of-date AST file. No functionality change yet. llvm-svn: 166446
* [Options] Add prefixes to options.Michael J. Spencer2012-10-221-2/+2
| | | | | | | | | | | | | | Each option has a set of prefixes. When matching an argument such as -funroll-loops. First the leading - is removed as it is a prefix. Then a lower_bound search for "funroll-loops" is done against the option table by option name. From there each option prefix + option name combination is tested against the argument. This allows us to support Microsoft style options where both / and - are valid prefixes. It also simplifies the cases we already have where options come in both - and -- forms. Almost every option for gnu-ld happens to have this form. llvm-svn: 166444
* [Options] Make Option non clang specific.Michael J. Spencer2012-10-191-1/+1
| | | | llvm-svn: 166348
* Change VerifyDiagnosticConsumer so that it *must* contain at least one ↵Andy Gibbs2012-10-191-6/+31
| | | | | | | | | | "expected-*" directive. As a result, for test-cases that are not expected to generate any diagnostics, an additional directive "expected-no-diagnostics" has been implemented which can then be included in such test-cases. This new directive may not be used in conjunction with any other "expected-*" directive. This change was initially proposed as a solution to the problem highlighted by check-in r164677, i.e. that -verify will not cause a test-case failure where the compile command does not actually reference the file. Patch reviewed by David Blaikie. llvm-svn: 166281
* Fix directive parsing in VerifyDiagnosticConsumer so that it ensures that ↵Andy Gibbs2012-10-191-5/+17
| | | | | | | | "expected" is at the start of the word and will no longer accept typos such as "junkexpected-*" as a valid "expected-*" directive. A very few test-cases had to be amended to adhere to the new rule. Patch reviewed by David Blaikie. llvm-svn: 166279
* Revert r166223 and the subsequent commits that depend on it, r166230 & r166235.Argyrios Kyrtzidis2012-10-181-1/+1
| | | | | | This seems to have introduced assertion hit when building compiler-rt. llvm-svn: 166245
* Add a new option for and disable column number information as thereEric Christopher2012-10-181-0/+3
| | | | | | | | | | are no known current users of column info. Robustify and fix up a few tests in the process. Reduces the size of debug information by a small amount. Part of PR14106 llvm-svn: 166236
* [Options] Make Option non clang specific.Michael J. Spencer2012-10-181-1/+1
| | | | llvm-svn: 166230
* Emit diagnostics in chunks even when we're trying to print colored template ↵Benjamin Kramer2012-10-181-12/+15
| | | | | | | | diffs. char-by-char is really slow on an unbuffered stream. llvm-svn: 166218
* Add -std=c++1y argument, for *highly* experimental C++14 support.Richard Smith2012-10-172-0/+3
| | | | llvm-svn: 166139
* Serialize TargetOptions into an AST file, and make sure that we keepDouglas Gregor2012-10-162-28/+18
| | | | | | | target options around so they can be accessed at any point (rather than keeping them transient). llvm-svn: 166072
* Teach TargetInfo to hold on to the TargetOptions with which it wasDouglas Gregor2012-10-151-4/+6
| | | | | | created. llvm-svn: 165943
* Make sure temporary files are deleted when recovering from a crash when ↵Benjamin Kramer2012-10-141-0/+1
| | | | | | compiling modules. llvm-svn: 165911
* Delete temporary output files when an error occurs during PCH reading.Benjamin Kramer2012-10-142-0/+2
| | | | | | | | This reduces the spam make test leaves behind in /tmp. The assert isn't particularly useful because it's not run with -disable-free (the default when using the clang driver) but should cover all -cc1 tests. llvm-svn: 165910
* [libclang] Improve AST serialization done by ASTUnit::Save().Argyrios Kyrtzidis2012-10-111-28/+64
| | | | | | | | | The ASTUnit needs to initialize an ASTWriter at the beginning of parsing to fully handle serialization of a translation unit that imports modules. Do this by introducing an option to enable it, which corresponds to CXTranslationUnit_ForSerialization on the C API side. llvm-svn: 165717
* When indexing a module file, for the ppIncludedFile callback giveArgyrios Kyrtzidis2012-10-101-5/+11
| | | | | | | an invalid location if the location points to the synthetic buffer for the module input. llvm-svn: 165592
* [modules] Consistently construct a buffer as input to build the module.Argyrios Kyrtzidis2012-10-101-82/+42
| | | | | | This means the main file for modules will always be a virtual one. llvm-svn: 165591
* Rework the (de-)serialization of macros, as stored inDouglas Gregor2012-10-093-1/+7
| | | | | | | | | | | | | | | | MacroInfo*. Instead of simply dumping an offset into the current file, give each macro definition a proper ID with all of the standard modules-remapping facilities. Additionally, when a macro is modified in a subsequent AST file (e.g., #undef'ing a macro loaded from another module or from a precompiled header), provide a macro update record rather than rewriting the entire macro definition. This gives us greater consistency with the way we handle declarations, and ties together macro definitions much more cleanly. Note that we're still not actually deserializing macro history (we never were), but it's far easy to do properly now. llvm-svn: 165560
* Don't emit double parentheses in __clang_version__.Benjamin Kramer2012-10-081-2/+2
| | | | | | PR14040. llvm-svn: 165415
* [Modules] Introduce Module::TopHeaders which is a set of top-level headersArgyrios Kyrtzidis2012-10-051-3/+8
| | | | | | that are associated with a (sub)module. llvm-svn: 165279
* [libclang] When indexing, invoke the importedASTFile for PCH files as well.Argyrios Kyrtzidis2012-10-031-0/+36
| | | | llvm-svn: 165161
* Introduce ASTConsumer::HandleImplicitImportDecl() callback that is invokedArgyrios Kyrtzidis2012-10-031-3/+6
| | | | | | when an ImportDecl that was implicitly created due to an inclusion directive. llvm-svn: 165084
* Some renames to use the 'visitor' nomenclature, no functionality change.Argyrios Kyrtzidis2012-10-031-1/+1
| | | | llvm-svn: 165083
* [libclang] When indexing an AST file, only deserialize the file levelArgyrios Kyrtzidis2012-10-021-0/+24
| | | | | | declarations of the current primary module. llvm-svn: 165046
* [libclang] When indexing an AST file, only deserialize the preprocessing recordArgyrios Kyrtzidis2012-10-021-0/+15
| | | | | | entities of the current primary module. llvm-svn: 165023
* For PPCallbacks::InclusionDirective() add a parameter for the module, wheneverArgyrios Kyrtzidis2012-09-292-4/+8
| | | | | | | an inclusion directive was automatically turned into a module import, and PPCallbacks::moduleImport() for an explicit module import. llvm-svn: 164874
* In the Module class, add a reference to the corresponding AST file.Argyrios Kyrtzidis2012-09-291-0/+3
| | | | llvm-svn: 164873
* Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. ↵Sylvestre Ledru2012-09-271-1/+1
| | | | | | See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164766 llvm-svn: 164769
* Fix a typo 'iff' => 'if'Sylvestre Ledru2012-09-271-1/+1
| | | | llvm-svn: 164766
* Per discussion in ↵Argyrios Kyrtzidis2012-09-272-4/+4
| | | | | | | | | | http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120917/064551.html have PPCallbacks::InclusionDirective pass the character range for the filename quotes or brackets. rdar://11113134 & http://llvm.org/PR13880 llvm-svn: 164743
* [libclang] Always report a CXCursor_MacroDefinition for code-completionArgyrios Kyrtzidis2012-09-271-3/+1
| | | | | | results for a macro name, not CXCursor_NotImplemented. llvm-svn: 164740
* Have ASTUnit::Save() return a bool to indicate save error.Argyrios Kyrtzidis2012-09-261-5/+5
| | | | | | Removes a dependency of ASTUnit to clang-c/Index.h. llvm-svn: 164704
* Allow disabling PCH validation when loading an AST file by checkingArgyrios Kyrtzidis2012-09-151-1/+4
| | | | | | an environment variable for debugging purposes. llvm-svn: 163958
* [libclang] When loading an AST file, make sure to apply the language optionsArgyrios Kyrtzidis2012-09-141-0/+15
| | | | | | | | to the target info. Related to rdar://12069503. llvm-svn: 163931
* Make TextDiagnostic more robust against SourceLocations which point into theRichard Smith2012-09-131-25/+54
| | | | | | | middle of UTF-8 characters, and avoid walking to such positions when adjusting column ranges for display. Fixes a couple of hangs when rendering diagnostics. llvm-svn: 163820
* Conditionally parse documentation comments in system headers byTed Kremenek2012-09-131-0/+3
| | | | | | | | | | passing -fretain-comments-from-system-headers. By default, the compiler no longer parses such documentation comments, as they can result in a noticeable compile time/PCH slowdown. Fixes <rdar://problem/11860820>. llvm-svn: 163778
* InitHeaderSearch.cpp: [mingw] Handle DOSish paths only on Win32 hosts.NAKAMURA Takumi2012-09-131-0/+4
| | | | llvm-svn: 163776
* [analyzer] Always include destructors in the analysis CFG.Jordan Rose2012-09-051-1/+0
| | | | | | | | | | | | | | | | | | | | | While destructors will continue to not be inlined (unless the analyzer config option 'c++-inlining' is set to 'destructors'), leaving them out of the CFG is an incomplete model of the behavior of an object, and can cause false positive warnings (like PR13751, now working). Destructors for temporaries are still not on by default, since (a) we haven't actually checked this code to be sure it's fully correct (in particular, we probably need to be very careful with regard to lifetime-extension when a temporary is bound to a reference, C++11 [class.temporary]p5), and (b) ExprEngine doesn't actually do anything when it sees a temporary destructor in the CFG -- not even invalidate the object region. To enable temporary destructors, set the 'cfg-temporary-dtors' analyzer config option to '1'. The old -cfg-add-implicit-dtors cc1 option, which controlled all implicit destructors, has been removed. llvm-svn: 163264
* Allow disabling of wchar_t type.Abramo Bagnara2012-09-052-3/+11
| | | | llvm-svn: 163221
* Make AnalyzerOptions a shared object between CompilerInvocation andTed Kremenek2012-08-311-2/+2
| | | | | | | AnalysisManager, allowing the StringMap of configuration values to be propagated. llvm-svn: 162978
* Move AnalyzerOptions.h into 'Core' StaticAnalyzer sub-library.Ted Kremenek2012-08-311-12/+12
| | | | llvm-svn: 162977
* [analyzer] Make analyzer-ipa=dynamic-bifurcate the default.Anna Zaks2012-08-301-1/+1
| | | | | | | There are two tests regressions that come from the fact that the Retain Count checker does not cancel out inlining of ObjC methods. llvm-svn: 162950
* Rename 'MaxLoop' to 'maxBlockVisitOnPath' to reflect reality. WeTed Kremenek2012-08-301-1/+1
| | | | | | should consider renaming the command line option as well. llvm-svn: 162932
* Rename 'VisualizeEGUbi' and 'VisualizeEGDot' to ↵Ted Kremenek2012-08-301-4/+6
| | | | | | | | 'visualizeExplodedGraphWithUbigGraph' and 'visualizeExplodedGraphWithGraphViz' respectively. llvm-svn: 162931
OpenPOWER on IntegriCloud