summaryrefslogtreecommitdiffstats
path: root/tools/libclang/CXLoadedDiagnostic.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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351636 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove \brief commands from doxygen comments.Adrian Prantl2018-05-091-1/+1
| | | | | | | | | | | | | | | | | | | This is similar to the LLVM change https://reviews.llvm.org/D46290. We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\@brief'); do perl -pi -e 's/\@brief //g' $i & done for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done Differential Revision: https://reviews.llvm.org/D46320 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331834 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Remove the 'extern "C"' blocks from the implementation files.Argyrios Kyrtzidis2016-12-171-2/+0
| | | | | | | These are unnecessary, the declarations already carry the 'extern C' property, and if there is mismatch between declaration and definition then we will get linker errors via libclang.exports. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290025 91177308-0d34-0410-b5e6-96231b3b80d8
* [NFC] Header cleanupMehdi Amini2016-07-181-2/+0
| | | | | | | | | | Summary: Removed unused headers, replaced some headers with forward class declarations Patch by: Eugene <claprix@yandex.ru> Differential Revision: https://reviews.llvm.org/D20100 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275882 91177308-0d34-0410-b5e6-96231b3b80d8
* Roll-back r250822.Angel Garcia Gomez2015-10-201-2/+2
| | | | | | | | | | Summary: It breaks the build for the ASTMatchers Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D13893 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250827 91177308-0d34-0410-b5e6-96231b3b80d8
* Apply modernize-use-default to clang.Angel Garcia Gomez2015-10-201-2/+2
| | | | | | | | | | | | Summary: Replace empty bodies of default constructors and destructors with '= default'. Reviewers: bkramer, klimek Subscribers: klimek, alexfh, cfe-commits Differential Revision: http://reviews.llvm.org/D13890 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250822 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix Clang-tidy modernize-use-nullptr warnings in source directories; other ↵Hans Wennborg2015-10-061-3/+4
| | | | | | | | | | minor cleanups Patch by Eugene Zelenko! Differential Revision: http://reviews.llvm.org/D13406 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@249484 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r240270 ("Fixed/added namespace ending comments using clang-tidy").Alexander Kornienko2015-06-221-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240353 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed/added namespace ending comments using clang-tidy. NFCAlexander Kornienko2015-06-221-2/+2
| | | | | | | | | | | | | | The patch is generated using this command: $ tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \ -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \ work/llvm/tools/clang To reduce churn, not touching namespaces spanning less than 10 lines. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240270 91177308-0d34-0410-b5e6-96231b3b80d8
* Use 'override/final' instead of 'virtual' for overridden methodsAlexander Kornienko2015-04-111-1/+1
| | | | | | | | | | | | | | | | | | | | Summary: The patch is generated using clang-tidy misc-use-override check. This command was used: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \ -checks='-*,misc-use-override' -header-filter='llvm|clang' -j=32 -fix Reviewers: dblaikie Reviewed By: dblaikie Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D8926 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234678 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing include.Benjamin Kramer2015-03-011-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230910 91177308-0d34-0410-b5e6-96231b3b80d8
* [cleanup] Re-sort the #include lines using llvm/utils/sort_includes.pyChandler Carruth2015-01-141-1/+1
| | | | | | | No functionality changed, this is a purely mechanical cleanup to ensure the #include order remains consistent across the project. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225975 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-apply "Frontend: Extract SerializedDiagnosticReader out of ↵Justin Bogner2014-10-141-429/+162
| | | | | | | | | | | | CXLoadedDiagnostic (NFC)" I'd mispelled "Bitcode/BitCodes.h" before, and tested on a case insensitive filesystem. This reverts commit r219649, effectively re-applying r219647 and r219648. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219664 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Frontend: Extract SerializedDiagnosticReader out of ↵Justin Bogner2014-10-141-162/+429
| | | | | | | | | | | CXLoadedDiagnostic (NFC)" The bots can't seem to find an include file. Reverting for now and I'll look into it in a bit. This reverts commits r219647 and r219648. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219649 91177308-0d34-0410-b5e6-96231b3b80d8
* Frontend: Extract SerializedDiagnosticReader out of CXLoadedDiagnostic (NFC)Justin Bogner2014-10-141-429/+162
| | | | | | | | | We currently read serialized diagnostics directly in the C API, which makes it difficult to reuse this logic elsewhere. This extracts the core of the serialized diagnostic parsing logic into a base class that can be subclassed using a visitor pattern. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219647 91177308-0d34-0410-b5e6-96231b3b80d8
* Correctly handle reading locations from serialized diagnosticsJustin Bogner2014-10-101-5/+7
| | | | | | | | | | | | | | When reading a serialized diagnostic location with no file ID, we were failing to increment the cursor past the rest of the location. This would lead to the flags and category always appearing blank in such diagnostics. This changes the function to unconditionally increment the cursor and updates the test to check for the correct output instead of testing that we were doing this wrong. I've also updated the error check to check for the correct number of fields. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219538 91177308-0d34-0410-b5e6-96231b3b80d8
* unique_ptrify the diagnostics in CXDiagnosticSetImplDavid Blaikie2014-08-291-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@216754 91177308-0d34-0410-b5e6-96231b3b80d8
* Return a std::unique_ptr from getBufferForFile. NFC.Rafael Espindola2014-08-261-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@216476 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Use 'nullptr'. Tools edition.Craig Topper2014-06-081-8/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210422 91177308-0d34-0410-b5e6-96231b3b80d8
* libclang: remove 'CXDiagnostic_Remark'Alp Toker2014-04-261-1/+2
| | | | | | | | | | | | | | | | The change was landed without review or test cases. It trivially broke almost any stable application checking for Severity >= CXDiagnostic_Error or indeed any other kind of severity comparison upon encountering a 'remark'. Mapped to CXDiagnostic_Warning until a workable solution is proposed to the list that preserves API stability. (It's also not clear why the rest of r202475 wasn't simply implemented as a modifier to the existing 'warning' level.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207319 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace OwningPtr with std::unique_ptr.Ahmed Charles2014-03-071-4/+5
| | | | | | This compiles cleanly with lldb/lld/clang-tools-extra/llvm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203279 91177308-0d34-0410-b5e6-96231b3b80d8
* Change OwningPtr::take() to OwningPtr::release().Ahmed Charles2014-03-071-2/+2
| | | | | | This is a precursor to moving to std::unique_ptr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203275 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix -Wsign-compare warning.Jordan Rose2014-03-041-2/+3
| | | | | | No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202864 91177308-0d34-0410-b5e6-96231b3b80d8
* Serialized diagnostic severity levels should be stable.Jordan Rose2014-03-031-8/+14
| | | | | | | | | Serialized diagnostics were accidentally using the AST diagnostic level values rather than a dedicated stable enum, so the addition of "remark" broke the reading of existing serialized diagnostics files. I've added a .dia file generated from Xcode 5's Clang to make sure we don't break this in the future. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202733 91177308-0d34-0410-b5e6-96231b3b80d8
* Sort all the #include lines with LLVM's utils/sort_includes.py whichChandler Carruth2014-01-071-3/+3
| | | | | | | encodes the canonical rules for LLVM's style. I noticed this had drifted quite a bit when cleaning up LLVM, so wanted to clean up Clang as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198686 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typos: [Dd]iagnosic -> [Dd]iagnosticStefanus Du Toit2013-03-011-1/+1
| | | | | | | These all appear in comments or (ironically) diagnostics output. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176383 91177308-0d34-0410-b5e6-96231b3b80d8
* libclang: don't store nul-terminated strings as StringRefs,Dmitri Gribenko2013-02-181-14/+13
| | | | | | | | | | | if the nul-terminatedness property is important for clients. Also, don't return the same CXString multiple times. This did not create a correctness issue in practice because the CXString was of an CXS_Unmanaged kind, and destruction was a no-op. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175455 91177308-0d34-0410-b5e6-96231b3b80d8
* libclang: remove 'using namespace cxstring'Dmitri Gribenko2013-02-031-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174285 91177308-0d34-0410-b5e6-96231b3b80d8
* libclang: introduce cxstring::{createRef,createDup} for StringRefsDmitri Gribenko2013-02-021-6/+6
| | | | | | | Also migrate all clients from the old API. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174263 91177308-0d34-0410-b5e6-96231b3b80d8
* libclang: itroduce cxstring::createEmpty()Dmitri Gribenko2013-02-011-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174174 91177308-0d34-0410-b5e6-96231b3b80d8
* update to use the new BitcodeCursor readRecord that takes a StringRef blob ↵Chris Lattner2013-01-201-38/+26
| | | | | | | | | parameter, and adopt "advance" in more places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172951 91177308-0d34-0410-b5e6-96231b3b80d8
* random tidyingChris Lattner2013-01-191-6/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172920 91177308-0d34-0410-b5e6-96231b3b80d8
* update header comment.Chris Lattner2013-01-191-12/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172909 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix CastingDavid Greene2013-01-151-1/+1
| | | | | | Use const_cast<> to avoid a cast-away-const error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172563 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement clang_getDiagnosticCategoryText() to provide a way for a client of ↵Ted Kremenek2012-04-121-0/+5
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154567 91177308-0d34-0410-b5e6-96231b3b80d8
* drop more llvm:: prefixes on OwningPtr<>Dylan Noblesmith2012-02-131-3/+3
| | | | | | More cleanup after r149798. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150379 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unreachable code in Clang. (replace with llvm_unreachable where ↵David Blaikie2012-01-171-3/+0
| | | | | | appropriate or when GCC requires it) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148292 91177308-0d34-0410-b5e6-96231b3b80d8
* Tweak serialized diagnostics to support errors with no categories. Fixes ↵Ted Kremenek2011-12-071-1/+2
| | | | | | <rdar://problem/10538300>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146011 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix serialized diagnostics to handle FixIts that only remove text. Fixes ↵Ted Kremenek2011-11-291-6/+17
| | | | | | <rdar://problem/10473903>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145339 91177308-0d34-0410-b5e6-96231b3b80d8
* Tweak CXLoadedDiagnosticSetImpl::makeString() to include an extra null ↵Ted Kremenek2011-11-111-5/+8
| | | | | | character, and change the creation of the FixIT's string to again just rely on this string (instead of duplicating it when calling createCXString). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144389 91177308-0d34-0410-b5e6-96231b3b80d8
* libclang/CXLoadedDiagnostic.cpp: Work around not to miss the string ↵NAKAMURA Takumi2011-11-111-1/+1
| | | | | | | | terminator on fixit. FixIts might be exposed as C string via clang_getCString(), though the zero terminator is not allocated in CXLoadedDiagnosticSetImpl::makeString. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144379 91177308-0d34-0410-b5e6-96231b3b80d8
* serialized diagnostics: implement full deserialization of clang diagnostics ↵Ted Kremenek2011-11-101-0/+655
via the libclang API. I've tested it on simple cases and it works. Test cases to follow as well as a few tweaks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144269 91177308-0d34-0410-b5e6-96231b3b80d8