summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/CIndexDiagnostic.cpp
Commit message (Collapse)AuthorAgeFilesLines
* libclang: remove 'using namespace cxstring'Dmitri Gribenko2013-02-031-1/+0
| | | | llvm-svn: 174285
* libclang: introduce cxstring::{createRef,createDup} for StringRefsDmitri Gribenko2013-02-021-3/+3
| | | | | | Also migrate all clients from the old API. llvm-svn: 174263
* libclang: itroduce cxstring::createEmpty()Dmitri Gribenko2013-02-011-10/+10
| | | | llvm-svn: 174174
* libclang: some type safety for CXTranslationUnitImpl's internalsDmitri Gribenko2013-01-261-2/+2
| | | | | | | There is no reason to store pointers as 'void*' in CXTranslationUnitImpl, since it does not affect libclang ABI. llvm-svn: 173588
* libclang: factor out the frequent pattern static_cast<ASTUnit *>(TU->TUData)Dmitri Gribenko2013-01-261-1/+1
| | | | | | into a getter cxtu::getASTUnit(TU) llvm-svn: 173585
* Remove useless 'llvm::' qualifier from names like StringRef and others that areDmitri Gribenko2013-01-121-1/+1
| | | | | | brought into 'clang' namespace by clang/Basic/LLVM.h llvm-svn: 172323
* Make DiagnosticOptions intrusively reference-counted, and make sureDouglas Gregor2012-10-231-4/+4
| | | | | | | the various stakeholders bump up the reference count. In particular, the diagnostics engine now keeps the DiagnosticOptions object alive. llvm-svn: 166508
* Fix an assertion hit when the serialized diagnostics writer receive a diagnosticArgyrios Kyrtzidis2012-05-101-10/+20
| | | | | | | | | | | | | | from the frontend when the location is invalid and the SourceManager null. Instead of keeping the SourceManager object in DiagnosticRenderer, propagate it to the calls accordingly (as reference when it is expected to not be null, or pointer when it may be null). This effectively makes DiagnosticRenderer not tied to a specific SourceManager, removing a hack from TextDiagnosticPrinter. rdar://11386874 llvm-svn: 156536
* Implement clang_getDiagnosticCategoryText() to provide a way for a client of ↵Ted Kremenek2012-04-121-1/+10
| | | | | | | | | libclang to accurately get the diagnostic category name from a serialized diagnostic when the version of libclang used to read the diagnostic file is newer than the clang that emitted the diagnostic file. llvm-svn: 154567
* Fix dead store warning.Ted Kremenek2012-04-041-1/+2
| | | | llvm-svn: 153988
* Unify naming of LangOptions variable/get function across the Clang stack ↵David Blaikie2012-03-111-1/+1
| | | | | | | | | | (Lex to AST). The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner llvm-svn: 152536
* Remove stray semi-colon.Daniel Dunbar2012-02-291-1/+1
| | | | llvm-svn: 151682
* Fix use-after-free introduced by me being an idiot.Ted Kremenek2012-02-141-6/+4
| | | | llvm-svn: 150461
* Implement new DiagnosticsRenderer that packages notes retrieved by ↵Ted Kremenek2012-02-141-3/+110
| | | | | | | | | clang_getDiagnosticSetFromTU() as child diagnostics of primary diagnostics. By using the DiagnosticRenderer, these Diagnostics now match with those generated for serialized diagnostics. llvm-svn: 150456
* drop more llvm:: prefixes on SmallString<>Dylan Noblesmith2012-02-131-1/+1
| | | | | | More cleanup after r149799. llvm-svn: 150380
* Add clang_getDiagnosticSetFromTU() to libclang. Fixes ↵Ted Kremenek2011-12-091-2/+9
| | | | | | <rdar://problem/10553081>. llvm-svn: 146287
* [libclang] Create a diagnostic set to pass at the end of indexing.Argyrios Kyrtzidis2011-12-011-2/+3
| | | | llvm-svn: 145557
* [libclang] Add a comment in lazyCreateDiags to explain why the check and ↵Argyrios Kyrtzidis2011-11-161-0/+17
| | | | | | | | reset of diagnostic set is necessary. llvm-svn: 144793
* [libclang] In lazyCreateDiags, recreate the diagnostic set if the number of ↵Argyrios Kyrtzidis2011-11-161-3/+16
| | | | | | | | diagnostics in the ASTUnit changed. llvm-svn: 144762
* serialized diagnostics: implement full deserialization of clang diagnostics ↵Ted Kremenek2011-11-101-7/+66
| | | | | | | | via the libclang API. I've tested it on simple cases and it works. Test cases to follow as well as a few tweaks. llvm-svn: 144269
* [libclang] Add CXDiagnosticImpl to represent a super class for the ↵Ted Kremenek2011-10-311-91/+28
| | | | | | | | implementation backing a CXDiagnostic. This allows CXStoredDiagnostic to be just one possible implementation of a CXDiagnostic. llvm-svn: 143368
* Rename Diagnostic to DiagnosticsEngine as per issue 5397David Blaikie2011-09-251-5/+5
| | | | llvm-svn: 140478
* Removing a bunch of dead returns/breaks after llvm_unreachables.David Blaikie2011-09-231-1/+1
| | | | llvm-svn: 140407
* Switch assert(0/false) llvm_unreachable.David Blaikie2011-09-231-1/+1
| | | | llvm-svn: 140367
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-3/+3
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* A StringRef-ication of the DiagnosticIDs API and internals.Argyrios Kyrtzidis2011-05-251-1/+2
| | | | | | | | | Patch by Matthieu Monrocq with tweaks by me to avoid StringRefs in the static diagnostic data structures, which resulted in a huge global-var-init function. Depends on llvm commit r132046. llvm-svn: 132047
* Extend the libclang diagnostic API to provide information about theDouglas Gregor2010-11-191-1/+92
| | | | | | option name, category ID, and category name corresponding to a diagnostic. llvm-svn: 119802
* Make definition of CXTranslationUnitImpl privateTed Kremenek2010-11-171-0/+1
| | | | | | to libclang. llvm-svn: 119585
* Change CXTranslationUnit to not directly cast to an ASTUnit*,Ted Kremenek2010-11-161-2/+2
| | | | | | | | | | | | | | | | | | | but to wrap both an ASTUnit and a "string pool" that will be used for fast USR generation. This requires a bunch of mechanical changes, as there was a ton of code that assumed that CXTranslationUnit and ASTUnit* were the same. Along with this change, introduce CXStringBuf, which provides an llvm::SmallVector<char> backing for repeatedly generating CXStrings without a huge amount of malloc() traffic. This requires making some changes to the representation of CXString by renaming a few fields (but keeping the size of the object the same). llvm-svn: 119337
* Move CXString creation/management routines intoTed Kremenek2010-11-161-0/+1
| | | | | | | their own .cpp file and make the interpretation of its flags private. llvm-svn: 119319
* ntroduce clang_getSpellingLocation() into libclang, to provide theDouglas Gregor2010-11-091-7/+7
| | | | | | | | | | | | | | location where we're spelling a token even within a macro. clang_getInstantiationLocation() tells where we instantiated the macro. I'm still not thrilled with the CXSourceLocation/CXSourceRange APIs, since they gloss over macro-instantiation information. Take 2: this time, adjusted tests appropriately and used a "simple" approach to the spelling location. llvm-svn: 118495
* Revert r118492, which didn't update all of its tests accordinglyDouglas Gregor2010-11-091-7/+7
| | | | llvm-svn: 118494
* Introduce clang_getSpellingLocation() into libclang, to provide theDouglas Gregor2010-11-091-7/+7
| | | | | | | | | | | location where we're spelling a token even within a macro. clang_getInstantiationLocation() tells where we instantiated the macro. I'm still not thrilled with the CXSourceLocation/CXSourceRange APIs, since they gloss over macro-instantiation information. llvm-svn: 118492
* When we load an ASTUnit from command-line arguments, hold on to theDouglas Gregor2010-10-121-6/+2
| | | | | | | | | diagnostics produced by the driver itself. Previously, we were allowing these to either be dropped or to slip through to stderr. Fixes <rdar://problem/7595339>. llvm-svn: 116285
* Eliminate -fdiagnostics-binary and all of the infrastructure forDouglas Gregor2010-10-111-53/+0
| | | | | | | | emitting diagnostics in a binary form to be consumed by libclang, since libclang no longer does any of its work out-of-process, making this code dead. Besides, this stuff never worked at 100% anyway. llvm-svn: 116250
* Simplify FixItHint by eliminated the unnecessary InsertionLocDouglas Gregor2010-08-181-20/+7
| | | | | | location. Patch by Eelis van der Weegen! llvm-svn: 111362
* Rename 'CIndex' to 'libclang', since it has basically become our stable publicDaniel Dunbar2010-04-301-0/+285
(C) API, and will likely grow further in this direction in the future. llvm-svn: 102779
OpenPOWER on IntegriCloud