summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/TextDiagnosticBuffer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [Frontend] Fix some Clang-tidy modernize and Include What You Use warnings; ↵Eugene Zelenko2018-03-221-10/+11
| | | | | | other minor fixes (NFC). llvm-svn: 328171
* [TextDiagnosticBuffer] Fix diagnostic note emission orderHal Finkel2017-12-161-13/+24
| | | | | | | | | | | | The frontend currently groups diagnostics from the command line according to diagnostic level, but that places all notes last. Fix that by emitting such diagnostics in the order they were generated. Patch by Joel E. Denny, thanks! Differential Revision: https://reviews.llvm.org/D40995 llvm-svn: 320904
* Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial typesBenjamin Kramer2015-05-291-4/+4
| | | | | | | | | | | | | | | | | | | | If the type isn't trivially moveable emplace can skip a potentially expensive move. It also saves a couple of characters. Call sites were found with the ASTMatcher + some semi-automated cleanup. memberCallExpr( argumentCountIs(1), callee(methodDecl(hasName("push_back"))), on(hasType(recordDecl(has(namedDecl(hasName("emplace_back")))))), hasArgument(0, bindTemporaryExpr( hasType(recordDecl(hasNonTrivialDestructor())), has(constructExpr()))), unless(isInTemplateInstantiation())) No functional change intended. llvm-svn: 238601
* Support 'remark' in VerifyDiagnosticConsumerTobias Grosser2014-05-011-0/+6
| | | | | | | After Diego added support for -Rpass=inliner we have now in-tree remarks which we can use to properly test this feature. llvm-svn: 207765
* TextDiagnosticBuffer: Fix copy-paste mistake in r197856Alp Toker2013-12-231-6/+3
| | | | | | | | | | | | | The TextDiagnosticBuffer is meant to scrub SourceLocations as the input/output SourceManagers may be different. To be safe this commit restores the original behaviour though in practice all current users seem to share a single SM. Would be nice to replace TextDiagnosticBuffer now that more capable interfaces like CaptureDiagnosticConsumer / StoredDiagnosticConsumer exist. llvm-svn: 197902
* Fix getCustomDiagID() usage in CodeGen and TextDiagnosticBufferAlp Toker2013-12-211-26/+9
| | | | | | | | | | DiagIDs are a cached resource generally only constructed from compile-time constant or stable format strings. Escaping arbitrary messages and constructing DiagIDs from them didn't make sense. llvm-svn: 197856
* Remove DiagnosticConsumer::clone(), a bad idea that is now unused.Douglas Gregor2013-05-031-3/+0
| | | | llvm-svn: 181070
* Escape % in the TextDiagnosticBuffer so they aren't interpreted twice when ↵Benjamin Kramer2012-12-081-3/+23
| | | | | | | | fed into the diagnostic formatting machinery again. Fixes PR14543. llvm-svn: 169677
* Basic: import SmallString<> into clang namespaceDylan Noblesmith2012-02-051-1/+1
| | | | | | | (I was going to fix the TODO about DenseMap too, but that would break self-host right now. See PR11922.) llvm-svn: 149799
* Introduce a pure virtual clone() method to DiagnosticConsumer, so thatDouglas Gregor2011-09-291-0/+4
| | | | | | | | | we have the ability to create a new, distict diagnostic consumer when we go off and build a module. This avoids the currently horribleness where the same diagnostic consumer sees diagnostics for multiple translation units (and multiple SourceManagers!) causing all sorts of havok. llvm-svn: 140743
* Rename DiagnosticInfo to Diagnostic as per issue 5397David Blaikie2011-09-261-1/+1
| | | | llvm-svn: 140493
* Rename DiagnosticClient to DiagnosticConsumer as per issue 5397David Blaikie2011-09-251-1/+1
| | | | llvm-svn: 140479
* Rename Diagnostic to DiagnosticsEngine as per issue 5397David Blaikie2011-09-251-9/+12
| | | | llvm-svn: 140478
* More missing header inclusions from llvm_unreachable migration.David Blaikie2011-09-231-0/+1
| | | | llvm-svn: 140369
* Switch assert(0/false) llvm_unreachable.David Blaikie2011-09-231-1/+2
| | | | llvm-svn: 140367
* Since multiple diagnostics can share one diagnostic client, have the client ↵Argyrios Kyrtzidis2010-11-181-0/+3
| | | | | | | | keeping track of the total number of warnings/errors reported. llvm-svn: 119731
* Add TextDiagnosticBuffer::FlushDiagnostics, for forwarding the buffered ↵Daniel Dunbar2009-11-301-0/+10
| | | | | | diagnostics to a different diagnostics engine. llvm-svn: 90125
* Simplify.Daniel Dunbar2009-11-291-6/+5
| | | | llvm-svn: 90091
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-1/+1
| | | | llvm-svn: 81346
* Rename lib/Driver (etc) to lib/Frontend in prep for the *actual*Daniel Dunbar2009-03-021-0/+39
driver taking lib/Driver. llvm-svn: 65811
OpenPOWER on IntegriCloud