summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/CXLoadedDiagnostic.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Clang] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere2019-08-141-2/+2
| | | | | | | | | | Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. Differential revision: https://reviews.llvm.org/D66259 llvm-svn: 368942
* [Bitcode] Move Bitstream to a separate libraryFrancis Visoiu Mistrih2019-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | This moves Bitcode/Bitstream*, Bitcode/BitCodes.h to Bitstream/. This is needed to avoid a circular dependency when using the bitstream code for parsing optimization remarks. Since Bitcode uses Core for the IR part: libLLVMRemarks -> Bitcode -> Core and Core uses libLLVMRemarks to generate remarks (see IR/RemarkStreamer.cpp): Core -> libLLVMRemarks we need to separate the Bitstream and Bitcode part. For clang-doc, it seems that it doesn't need the whole bitcode layer, so I updated the CMake to only use the bitstream part. Differential Revision: https://reviews.llvm.org/D63899 llvm-svn: 365091
* 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
* 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 llvm-svn: 331834
* [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. llvm-svn: 290025
* [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 llvm-svn: 275882
* 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 llvm-svn: 250827
* 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 llvm-svn: 250822
* 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 llvm-svn: 249484
* Revert r240270 ("Fixed/added namespace ending comments using clang-tidy").Alexander Kornienko2015-06-221-2/+2
| | | | llvm-svn: 240353
* 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. llvm-svn: 240270
* 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 llvm-svn: 234678
* Add missing include.Benjamin Kramer2015-03-011-0/+1
| | | | llvm-svn: 230910
* [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. llvm-svn: 225975
* 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. llvm-svn: 219664
* 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. llvm-svn: 219649
* 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. llvm-svn: 219647
* 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. llvm-svn: 219538
* unique_ptrify the diagnostics in CXDiagnosticSetImplDavid Blaikie2014-08-291-1/+1
| | | | llvm-svn: 216754
* Return a std::unique_ptr from getBufferForFile. NFC.Rafael Espindola2014-08-261-3/+1
| | | | llvm-svn: 216476
* [C++11] Use 'nullptr'. Tools edition.Craig Topper2014-06-081-8/+8
| | | | llvm-svn: 210422
* 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.) llvm-svn: 207319
* Replace OwningPtr with std::unique_ptr.Ahmed Charles2014-03-071-4/+5
| | | | | | This compiles cleanly with lldb/lld/clang-tools-extra/llvm. llvm-svn: 203279
* Change OwningPtr::take() to OwningPtr::release().Ahmed Charles2014-03-071-2/+2
| | | | | | This is a precursor to moving to std::unique_ptr. llvm-svn: 203275
* Fix -Wsign-compare warning.Jordan Rose2014-03-041-2/+3
| | | | | | No functionality change. llvm-svn: 202864
* 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. llvm-svn: 202733
* 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. llvm-svn: 198686
* Fix typos: [Dd]iagnosic -> [Dd]iagnosticStefanus Du Toit2013-03-011-1/+1
| | | | | | These all appear in comments or (ironically) diagnostics output. llvm-svn: 176383
* 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. llvm-svn: 175455
* libclang: remove 'using namespace cxstring'Dmitri Gribenko2013-02-031-1/+0
| | | | llvm-svn: 174285
* libclang: introduce cxstring::{createRef,createDup} for StringRefsDmitri Gribenko2013-02-021-6/+6
| | | | | | Also migrate all clients from the old API. llvm-svn: 174263
* libclang: itroduce cxstring::createEmpty()Dmitri Gribenko2013-02-011-2/+2
| | | | llvm-svn: 174174
* 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. llvm-svn: 172951
* random tidyingChris Lattner2013-01-191-6/+3
| | | | llvm-svn: 172920
* update header comment.Chris Lattner2013-01-191-12/+12
| | | | llvm-svn: 172909
* Fix CastingDavid Greene2013-01-151-1/+1
| | | | | | Use const_cast<> to avoid a cast-away-const error. llvm-svn: 172563
* 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. llvm-svn: 154567
* drop more llvm:: prefixes on OwningPtr<>Dylan Noblesmith2012-02-131-3/+3
| | | | | | More cleanup after r149798. llvm-svn: 150379
* Remove unreachable code in Clang. (replace with llvm_unreachable where ↵David Blaikie2012-01-171-3/+0
| | | | | | appropriate or when GCC requires it) llvm-svn: 148292
* Tweak serialized diagnostics to support errors with no categories. Fixes ↵Ted Kremenek2011-12-071-1/+2
| | | | | | <rdar://problem/10538300>. llvm-svn: 146011
* Fix serialized diagnostics to handle FixIts that only remove text. Fixes ↵Ted Kremenek2011-11-291-6/+17
| | | | | | <rdar://problem/10473903>. llvm-svn: 145339
* 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). llvm-svn: 144389
* 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. llvm-svn: 144379
* 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. llvm-svn: 144269
OpenPOWER on IntegriCloud