summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
Commit message (Collapse)AuthorAgeFilesLines
...
* Extract the actual printing of the message string into a helperChandler Carruth2011-09-261-32/+33
| | | | | | | | | function. Doing this conveniently requires moving the word wrapping to use a StringRef which seems generally an improvement. There is a lot that could be simplified in the word wrapping by using StringRef that I haven't looked at yet... llvm-svn: 140524
* Group the helpers for word wrapping with the primary routine. NoChandler Carruth2011-09-261-92/+92
| | | | | | functionality changed. llvm-svn: 140523
* Don't map a file:line:col triplet that is inside the preamble range toArgyrios Kyrtzidis2011-09-261-12/+44
| | | | | | | | | | | | | | a "loaded" location of the precompiled preamble. Instead, handle specially locations of preprocessed entities: -When looking up for preprocessed entities, map main file locations inside the preamble range to a preamble loaded location. -When getting the source range of a preprocessing cursor, map preamble loaded locations back to main file locations. Fixes rdar://10175093 & http://llvm.org/PR10999 llvm-svn: 140519
* Don't print a stray ] at the end of diagnostics.Benjamin Kramer2011-09-261-3/+4
| | | | | | Also remove an obsolete utostr call. llvm-svn: 140511
* Remove support for splitting word-wrapped diagnostic messages on newlineChandler Carruth2011-09-261-18/+2
| | | | | | | | | | | | characters. I could find no newline character in a diagnostic message, and adding an assert to this code never fires in the testsuite. I think this code is essentially dead, and was previously used for a different purpose. If I just don't understand how it is we can end up with a newline here please let me know (with a test case?) and I'll revert. llvm-svn: 140497
* Move the word wrapped printing routine down to all the other helperChandler Carruth2011-09-261-82/+77
| | | | | | | printing routines, clean up its doxyments and switch it to a camelCase name as well. No functionality changed here. llvm-svn: 140496
* Switch some of my recently added helper functions to use the properChandler Carruth2011-09-261-6/+19
| | | | | | style, and add doxyments. llvm-svn: 140495
* Rewrite the printing of diagnostic options, categories, etc to actuallyChandler Carruth2011-09-261-35/+29
| | | | | | use the ostream interface and avoid lots of temporary strings. llvm-svn: 140494
* Rename DiagnosticInfo to Diagnostic as per issue 5397David Blaikie2011-09-265-9/+9
| | | | llvm-svn: 140493
* Delete an extraneous line I missed.Chandler Carruth2011-09-261-1/+0
| | | | llvm-svn: 140491
* A direct extraction of the rest of the option printing into a helper.Chandler Carruth2011-09-261-51/+57
| | | | | | This needs to be cleaned up to better use the ostream object, WIP. llvm-svn: 140490
* Rename VerifyDiagnosticsClient to VerifyDiagnosticConsumer as per issue 5397David Blaikie2011-09-263-11/+11
| | | | llvm-svn: 140489
* Start a more correct pattern for factoring out the name printing. SlowlyChandler Carruth2011-09-261-7/+10
| | | | | | | I'm planning to switch a bunch of these over to use a raw_ostream instead of += on a string object. llvm-svn: 140488
* Revert r140484. That was *not* ready to be committed! Only halfway done,Chandler Carruth2011-09-261-39/+34
| | | | | | | | and completely broken at that. Sorry, must remember to stash rather than commit. =] llvm-svn: 140487
* Fix a formatting goof.Chandler Carruth2011-09-261-1/+1
| | | | llvm-svn: 140486
* Rename ChainedDiagnosticClient to ChainedDiagnosticConsumer as per issue 5397David Blaikie2011-09-261-3/+3
| | | | llvm-svn: 140485
* Extract the diagnostic message formatting into a helper routine.Chandler Carruth2011-09-261-34/+39
| | | | llvm-svn: 140484
* Rename StoredDiagnosticClient to StoredDiagnosticConsumer as per issue 5397David Blaikie2011-09-261-6/+6
| | | | llvm-svn: 140483
* Extract the logic for printing a colorful level name into a helperChandler Carruth2011-09-251-21/+28
| | | | | | function. llvm-svn: 140481
* Rename DiagnosticClient to DiagnosticConsumer as per issue 5397David Blaikie2011-09-256-15/+15
| | | | llvm-svn: 140479
* Rename Diagnostic to DiagnosticsEngine as per issue 5397David Blaikie2011-09-2512-91/+96
| | | | llvm-svn: 140478
* Inline this method now that its completely trivial, and prepare forChandler Carruth2011-09-251-18/+9
| | | | | | hoisting parts of the text diagnostic. llvm-svn: 140477
* Shuffle some names around. 'CaretDiagnostic' is inaccurate as this needsChandler Carruth2011-09-251-18/+21
| | | | | | | to handle non-caret diagnostics as well in order to be fully useful in libclang etc. Also sketch out some more of my plans on this refactoring. llvm-svn: 140476
* Actually remove the members of CaretDiagnostic no longer in use forChandler Carruth2011-09-251-10/+6
| | | | | | | | tracking the start and stop of macro expansion suppression. Also remove the Columns variable which was just a convenience variable based on DiagOpts. Instead we materialize it in the one piece of code that cared. llvm-svn: 140475
* Sink the logic for suppressing some macro expansion notes from theChandler Carruth2011-09-251-41/+29
| | | | | | | | | | | | | | | | TextDiagnosticPrinter into the CaretDiagnostic class. Several interesting results from this: - This removes a significant per-diagnostic bit of state from the CaretDiagnostic class, which should eventually allow us to re-use the object. - It removes a redundant recursive walk of the macro expansion stack just to compute the depth. We don't need the depth until we're unwinding anyways, so we can just mark when we reach it. - It also paves the way for several simplifications we can do to how we implement the suppression. llvm-svn: 140474
* Split the recursive macro expansion walk out from the routine whichChandler Carruth2011-09-251-58/+71
| | | | | | emits a source snippet and caret line. llvm-svn: 140467
* Don't translate CRLF files into LF files. Fixes PR6870, from Aaron Ballman!Douglas Gregor2011-09-231-2/+43
| | | | llvm-svn: 140435
* More missing header inclusions from llvm_unreachable migration.David Blaikie2011-09-232-0/+2
| | | | llvm-svn: 140369
* Switch assert(0/false) llvm_unreachable.David Blaikie2011-09-234-7/+8
| | | | llvm-svn: 140367
* Reenable -cxx-isystem for Objective C++, until I come up with a better solutionBenjamin Kramer2011-09-231-1/+1
| | | | llvm-svn: 140365
* Add support for CPATH and friends.Benjamin Kramer2011-09-222-63/+35
| | | | | | | | | | | | This moves the existing code for CPATH into the driver and adds the environment lookup and path splitting there. The paths are then passed down to cc1 with -I options (CPATH), added after the normal user-specified include dirs. Language specific paths are passed via -LANG-isystem and the actual filtering is performed in the frontend. I tried to match GCC's behavior as close as possible Fixes PR8971. llvm-svn: 140341
* In the OpenCL mode, the AltiVec mode must be off and checks must be strictTobias Grosser2011-09-211-2/+2
| | | | | | | | | | OpenCL is different from AltiVec in the way it supports vector literals. OpenCL is strict with regards to semantic checks. For example, implicit conversions and explicit casts between vectors of different types are disallowed. Fixes PR10975. Submitted by: Anton Lokhmotov <Anton.lokhmotov@gmail.com> llvm-svn: 140270
* Remove __WCHAR_UNSIGNED__ and anything that used it.Eric Christopher2011-09-201-3/+0
| | | | llvm-svn: 140155
* In libclang, when visiting preprocessed entities in a source range, useArgyrios Kyrtzidis2011-09-191-61/+1
| | | | | | | | | | PreprocessingRecord's getPreprocessedEntitiesInRange. Also remove all the stuff that were added in ASTUnit that are unnecessary now that we do a binary search for preprocessed entities and deserialize only what is necessary. llvm-svn: 140063
* Introduce local_begin()/local_end() methods in PreprocessingRecord whichArgyrios Kyrtzidis2011-09-191-1/+1
| | | | | | return iterators for local, non-loaded, preprocessed entities. llvm-svn: 140062
* [libclang] When getting a source location from a file:line:col tripletArgyrios Kyrtzidis2011-09-192-7/+44
| | | | | | | check whether the requested location points inside the precompiled preamble, in which case the returned source location will be a "loaded" one. llvm-svn: 140060
* Rename SourceLocation::getFileLocWithOffset -> getLocWithOffset.Argyrios Kyrtzidis2011-09-191-3/+3
| | | | | | It already works (and is useful with) macro locs as well. llvm-svn: 140057
* Do not use builtin includes if -fms-compatibility is specified. Some MSVC ↵Francois Pichet2011-09-191-1/+2
| | | | | | header files have the same name as clang's builtins, this creates clash. llvm-svn: 140009
* Rename LangOptions::Microsoft to LangOptions::MicrosoftExt to make it clear ↵Francois Pichet2011-09-173-5/+5
| | | | | | | | that this flag must be used only for Microsoft extensions and not emulation; to avoid confusion with the new LangOptions::MicrosoftMode flag. Many of the code now under LangOptions::MicrosoftExt will eventually be moved under the LangOptions::MicrosoftMode flag. llvm-svn: 139987
* As per discussion with Doug Gregor on the IRC channel, introduce a new ↵Francois Pichet2011-09-171-0/+1
| | | | | | | | | | | | compiler switch: -fms-compatility. Microsoft specific tweaking will now fall into 2 categories: - fms-extension: Microsoft specific extensions that should never change the meaning of an otherwise well formed code. Currently map to LangOptions::Microsoft. (To be clearer, I am planning to change the name to LangOptions::MicrosoftExt). - fms-compatibility: Really a MSVC emulation mode. Map to LangOptions::MicrosoftMode. Can change the meaning of an otherwise standard conformant program. llvm-svn: 139978
* Add an experimental flag -fauto-module-import that automatically turnsDouglas Gregor2011-09-153-2/+10
| | | | | | | #include or #import direcctives of framework headers into module imports of the corresponding framework module. llvm-svn: 139860
* Comment what's going on when we compile a moduleDouglas Gregor2011-09-151-0/+8
| | | | llvm-svn: 139837
* Detect cyclic module dependencies in a manner that is rather moreDouglas Gregor2011-09-151-0/+23
| | | | | | graceful than running out of stack space. llvm-svn: 139833
* Eliminate the list of modules from the preprocessor options. This wasDouglas Gregor2011-09-151-24/+0
| | | | | | | used back when we had an -import-module command-line option, but it's no longer used (or useful). llvm-svn: 139829
* Eliminate the unused -create-module cc1-level optionDouglas Gregor2011-09-151-3/+0
| | | | llvm-svn: 139827
* When we load the first module, make sure that we wire up the ASTConsumer to ↵Douglas Gregor2011-09-151-0/+2
| | | | | | the newly-created ASTReader. This makes sure that CodeGen sees the declarations it is interested in llvm-svn: 139824
* [PCH] Overhaul how preprocessed entities are [de]serialized.Argyrios Kyrtzidis2011-09-151-2/+2
| | | | | | | | | | | | | -Use an array of offsets for all preprocessed entities -Get rid of the separate array of offsets for just macro definitions; for references to macro definitions use an index inside the preprocessed entities array. -Deserialize each preprocessed entity lazily, at first request; not in bulk. Paves the way for binary searching of preprocessed entities that will offer efficiency and will simplify things on the libclang side a lot. llvm-svn: 139809
* Make -E work with module importsDouglas Gregor2011-09-141-5/+11
| | | | llvm-svn: 139750
* Encode the module hash in base-36, to reduce the length of the strings a bitDouglas Gregor2011-09-141-2/+6
| | | | llvm-svn: 139696
* Assert that the module hash produced after stripping away non-modular ↵Douglas Gregor2011-09-131-3/+2
| | | | | | options is the same as the module hash before stripping those options. llvm-svn: 139663
OpenPOWER on IntegriCloud