summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Fix a typo in the new VerifyOnly handling in SemaInit. No visible ↵Eli Friedman2011-09-261-1/+1
| | | | | | difference at the moment, as far as I can tell. llvm-svn: 140546
* Add a small note to BaseSubobject about where it is actually used.Eli Friedman2011-09-261-1/+1
| | | | llvm-svn: 140543
* Fix assertion hit when @encoding C++ classes. rdar://10172840 & ↵Argyrios Kyrtzidis2011-09-262-2/+23
| | | | | | http://llvm.org/PR10990 llvm-svn: 140542
* Add back support for a manually formatted section of the diagnosticChandler Carruth2011-09-262-1/+17
| | | | | | | | | | | message. Specifically, we now only line-wrap the first line of te diagnostic message and assume the remainder is manually formatted. While adding it back, simplify the logic for doing this. Finally, add a test that ensures we actually preserve this feature. =D *Now* its not dead code. Thanks to Doug for the test case. llvm-svn: 140538
* Update comments.Eric Christopher2011-09-261-3/+3
| | | | llvm-svn: 140531
* Fix comment to reflect reality.Eric Christopher2011-09-261-2/+1
| | | | llvm-svn: 140530
* Re-arrange and bitfieldify data members of CXXConstructExpr to save aDouglas Gregor2011-09-262-8/+8
| | | | | | little storage. llvm-svn: 140529
* Diagnose attempts to use 'using typename' with a non-identifier name,Douglas Gregor2011-09-263-0/+25
| | | | | | from Stepan Dyatkovskiy. Fixes PR10925. llvm-svn: 140528
* Hoist and beef up the asserts about the level of infrastructure expectedChandler Carruth2011-09-261-5/+10
| | | | | | | | | | | | | | | | | when working with a diagnostic attached to a source location. Also comment more thoroughly why its important to handle non-location diagnostic messages separately. Finally, hoist the creation of the TextDiagnostic object up to the beginning of the location-based diagnostics. This paves the way for sinking more and more of the logic into this class. When everything below this constructor is sunk into the TextDiagnostic class it should be sufficiently "feature complete" to accomplish my two goals: 1) Have the printing of a macro expansion note use the exact same code as any other note. 2) Be able to implement clang_formatDiagnostic in terms of this class. llvm-svn: 140526
* Switch the emission of diagnostics without a source location toChandler Carruth2011-09-261-22/+32
| | | | | | | | | | | | | | | | | | | | | a dedicated path. The logic for such diagnostics is much simpler than for others. This begins to make an important separation in this routine. We expect most (and most interesting) textual diagnostics to be made in the presence of at least *some* source locations and a source manager. However the DiagnosticConsumer must be prepared to diagnose errors even when the source manager doesn't (yet) exist or when there is no location information at all. In order to sink more and more logic into the TextDiagnostic class while minimizing its complexity, my plan is to force the DiagnosticConsumer to special case diagnosing any locationless messages and then hand the rest to the TextDiagnostic class. I'd appreciate any comments on this design. It requires a bit of code duplication in order to keep interfaces simple. Alternatively, if we really need TextDiagnostic to be capable of handling diagnostics even in the absence of a viable SourceManager, then this split isn't necessary. llvm-svn: 140525
* 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
* Add a test for the display of diagnostic options and categories. ThisChandler Carruth2011-09-261-0/+27
| | | | | | | | | | would have caught a bug I introduced during refactoring. Silly me thinking this was all well tested already... If any of this is already covered by other tests, let me know. I looked around and didn't see any. llvm-svn: 140522
* Associate the macro arguments location map with a FileID insteadArgyrios Kyrtzidis2011-09-262-28/+28
| | | | | | | of a ContentCache, since multiple FileIDs can have the same ContentCache but the expanded macro arguments locations will be different. llvm-svn: 140521
* Remove SourceManager::getLocation().Argyrios Kyrtzidis2011-09-261-14/+0
| | | | | | | | It's not descriptive enough and it's just a call of translateFileLineCol() followed by a call to getMacroArgExpandedLocation(), which is better to be called explicitly since it has a certain cost and is not always required. llvm-svn: 140520
* Don't map a file:line:col triplet that is inside the preamble range toArgyrios Kyrtzidis2011-09-267-102/+224
| | | | | | | | | | | | | | 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
* Properly initialize Preprocessor::CurLexerKind to avoid use of uninitialized ↵Zhongxing Xu2011-09-261-2/+2
| | | | | | variable. llvm-svn: 140514
* Turns out we tested for this typo.Benjamin Kramer2011-09-261-2/+2
| | | | llvm-svn: 140513
* Add missing spaces in diagnostic messages.Benjamin Kramer2011-09-261-3/+2
| | | | llvm-svn: 140512
* 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
* Move VTable builder to ASTPeter Collingbourne2011-09-265-2707/+2763
| | | | llvm-svn: 140510
* Have CodeGenVTables::GenerateConstructionVTable use VTableLayoutPeter Collingbourne2011-09-262-18/+14
| | | | llvm-svn: 140509
* Move vtable dumper call to VTableBuilder ctorPeter Collingbourne2011-09-262-224/+226
| | | | llvm-svn: 140508
* Implement VTableContext::createConstructionVTableLayoutPeter Collingbourne2011-09-262-10/+29
| | | | llvm-svn: 140507
* Move all vtable layout data into new VTableLayout classPeter Collingbourne2011-09-265-118/+150
| | | | llvm-svn: 140506
* Move VTableComponent to header filePeter Collingbourne2011-09-262-167/+167
| | | | llvm-svn: 140505
* Move vtable component accessors to VTableContextPeter Collingbourne2011-09-265-97/+110
| | | | llvm-svn: 140504
* Remove CodeGenVTables::ComputeVTableRelatedInformation dependency on CodeGenPeter Collingbourne2011-09-265-37/+30
| | | | llvm-svn: 140503
* Create a VTableContext class and start moving CodeGenVTables methods to itPeter Collingbourne2011-09-268-52/+70
| | | | llvm-svn: 140502
* Move VTT builder to ASTPeter Collingbourne2011-09-264-337/+390
| | | | llvm-svn: 140501
* Move BaseSubobject class to ASTPeter Collingbourne2011-09-262-66/+88
| | | | llvm-svn: 140500
* Remove CodeGenModule field from VTTBuilderPeter Collingbourne2011-09-261-11/+11
| | | | llvm-svn: 140499
* Make the VTTBuilder class independent of LLVM corePeter Collingbourne2011-09-262-95/+129
| | | | llvm-svn: 140498
* 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-2621-39/+39
| | | | llvm-svn: 140493
* Rename PathDiagnosticClient to PathDiagnosticConsumer as per issue 5397David Blaikie2011-09-2613-62/+64
| | | | llvm-svn: 140492
* 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-265-21/+21
| | | | 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-262-9/+9
| | | | 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
* Rename CaptureDiagnosticClient to CaptureDiagnosticConsumer as per issue 5397David Blaikie2011-09-251-4/+4
| | | | llvm-svn: 140482
* Extract the logic for printing a colorful level name into a helperChandler Carruth2011-09-251-21/+28
| | | | | | function. llvm-svn: 140481
OpenPOWER on IntegriCloud