summaryrefslogtreecommitdiffstats
path: root/clang/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* [index] Enhance c-index-test tool and have it link and test the clangIndex ↵Argyrios Kyrtzidis2016-02-143-4/+220
| | | | | | library directly. llvm-svn: 260842
* [index] Allow calling createIndexingAction() without passing another action ↵Argyrios Kyrtzidis2016-02-141-2/+3
| | | | | | to wrap over. llvm-svn: 260841
* Reduce the number of implicit StringRef->std::string conversions by ↵Benjamin Kramer2016-02-131-1/+1
| | | | | | | | threading StringRef through more APIs. No functionality change intended. llvm-svn: 260815
* libclang/CMakeLists.txt: Prune IndexingContext.h out of ADDITIONAL_HEADERS. ↵NAKAMURA Takumi2016-02-131-1/+0
| | | | | | VS IDE uses it. llvm-svn: 260802
* [libclang] Separate the underlying indexing functionality of libclang and ↵Argyrios Kyrtzidis2016-02-127-1073/+423
| | | | | | | | introduce it into the clangIndex library. It is a general goodness for libclang itself to mostly be a wrapper of functionality provided by the libraries. llvm-svn: 260760
* [CMake] Improve the clang order-file generation workflowChris Bieneman2016-02-121-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This commit re-lands r259862. The underlying cause of the build breakage was an incorrectly written capabilities test. In tools/Driver/CMakeLists.txt I was attempting to check if a linker flag worked, the test was passing it to the compiler, not the linker. CMake doesn't have a linker test, so we have a hand-rolled one. Original Patch Review: http://reviews.llvm.org/D16896 Original Summary: With this change generating clang order files using dtrace uses the following workflow: cmake <whatever options you want> ninja generate-order-file ninja clang This patch works by setting a default path to the order file (which can be overridden by the user). If the order file doesn't exist during configuration CMake will create an empty one. CMake then ties up the dependencies between the clang link job and the order file, and generate-order-file overwrites CLANG_ORDER_FILE with the new order file. Reviewers: bogner Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D16999 llvm-svn: 260742
* [OPENMP] Rename OMPCapturedFieldDecl to OMPCapturedExprDecl, NFC.Alexey Bataev2016-02-111-1/+1
| | | | | | | | OMPCapturedExprDecl allows caopturing not only of fielddecls, but also other expressions. It also allows to simplify codegen for several clauses. llvm-svn: 260492
* [analyzer] Windows: launch scan-build from an arbitrary location.Anton Yartsev2016-02-107-0/+7
| | | | | | The following batch files allow to launch scan-build from an arbitrary location if path to clang\tools\scan-build-py\bin is added to %PATH%. llvm-svn: 260420
* Fix some Clang-tidy readability-redundant-control-flow warnings; other minor ↵Eugene Zelenko2016-02-101-6/+0
| | | | | | | | fixes. Differential revision: http://reviews.llvm.org/D17060 llvm-svn: 260414
* clang-format sort include use the source file name to determine theDaniel Jasper2016-02-101-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "main include" that will be the 1st include (category 0). Because the clang-format visual studio extension does not pass the file name and use the standard input, sort include cannot find a "main include": Testing fix on llvm\tools\clang\lib\Format\Format.cpp: Original file: #include "clang/Format/Format.h" ... #include "clang/Basic/SourceManager.h" #include "clang/Lex/Lexer.h" Without fix, selecting the includes and running visual studio clang-format: ... #include "clang/Basic/SourceManager.h" #include "clang/Format/Format.h" #include "clang/Lex/Lexer.h" With fix, selecting the includes and running visual studio clang-format: #include "clang/Format/Format.h" ... #include "clang/Basic/SourceManager.h" #include "clang/Lex/Lexer.h" Test 2 with main header not at the start: Original file: ... #include "clang/Format/Format.h" #include "clang/Basic/SourceManager.h" #include "clang/Lex/Lexer.h" Without fix, selecting the includes and running visual studio clang-format: ... #include "clang/Basic/SourceManager.h" #include "clang/Format/Format.h" #include "clang/Lex/Lexer.h" With fix, selecting the includes and running visual studio clang-format: #include "clang/Format/Format.h" ... #include "clang/Basic/SourceManager.h" #include "clang/Lex/Lexer.h" Patch by Jean-Philippe Dufraigne, thank you. Review: http://reviews.llvm.org/D16524 llvm-svn: 260378
* libclang: Enable skip-parsed-bodies on win32.NAKAMURA Takumi2016-02-101-22/+0
| | | | | | I guess it would be working since Rafael's r187619. llvm-svn: 260344
* [libclang] indexing: make sure to not visit init-list expressions twice.Argyrios Kyrtzidis2016-02-091-11/+58
| | | | llvm-svn: 260255
* [libclang] indexing: handle 'TopLevelDeclInObjCContainers' at the point ↵Argyrios Kyrtzidis2016-02-093-26/+2
| | | | | | | | where they are reported. It isn't much benefit and doesn't worth the complexity to try to handle them after the container is encountered. llvm-svn: 260254
* [libclang] indexing: for a synthesized property reference have the parent be ↵Argyrios Kyrtzidis2016-02-091-2/+3
| | | | | | the ObjC implementation decl. llvm-svn: 260253
* [libclang] indexing: Have the semantic container of synthesized ObjC ↵Argyrios Kyrtzidis2016-02-092-5/+9
| | | | | | | | getter/setter methods be the implementation decl. Matches the behavior of other ObjC methods. llvm-svn: 260250
* Move static functions returning UDTs outside of the extern "C" block. ↵Aaron Ballman2016-02-081-32/+33
| | | | | | Silences an MSVC warning, and reduces the number of exported symbols. llvm-svn: 260104
* [OPENMP 4.5] Ccapture/codegen of private non-static data members.Alexey Bataev2016-02-081-0/+1
| | | | | | | OpenMP 4.5 introduces privatization of non-static data members of current class in non-static member functions. To correctly handle such kind of privatization a new (pseudo)declaration VarDecl-based node is added. It allows to reuse an existing code for capturing variables in Lambdas/Block/Captured blocks of code for correct privatization and codegen. llvm-svn: 260077
* Index: provide adjustment thunk information for C++ manglingsSaleem Abdulrasool2016-02-061-0/+39
| | | | | | | Add support for exposing the adjustment thunk for virtual methods as appropriate. llvm-svn: 260011
* [CMake] One more try to make CMake clean up after itselfChris Bieneman2016-02-051-1/+1
| | | | | | Seriously... CMake... You're on my list... llvm-svn: 259873
* Revert "[CMake] Improve the clang order-file generation workflow"Chris Bieneman2016-02-051-5/+1
| | | | | | | | | | | | | This reverts commit r259862, and attempts to fix builder CMakeCaches. Will try this again some other time... Conflicts: CMakeLists.txt tools/driver/CMakeLists.txt llvm-svn: 259872
* [CMake] Trying to fix a bot failure I introduced in r259862Chris Bieneman2016-02-051-1/+1
| | | | | | CMake caching behavior makes me sad. llvm-svn: 259864
* [CMake] Improve the clang order-file generation workflowChris Bieneman2016-02-051-1/+5
| | | | | | | | | | | | | | | | | | | | | | | Summary: With this change generating clang order files using dtrace uses the following workflow: cmake <whatever options you want> ninja generate-order-file ninja clang This patch works by setting a default path to the order file (which can be overridden by the user). If the order file doesn't exist during configuration CMake will create an empty one. CMake then ties up the dependencies between the clang link job and the order file, and generate-order-file overwrites CLANG_ORDER_FILE with the new order file. Reviewers: bogner Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D16896 llvm-svn: 259862
* [OpenMP] Parsing + sema for target parallel for directive.Arpith Chacko Jacob2016-02-032-0/+12
| | | | | | | | | | | Summary: This patch adds parsing + sema for the target parallel for directive along with testcases. Reviewers: ABataev Differential Revision: http://reviews.llvm.org/D16759 llvm-svn: 259654
* Class Property: class property and instance property can have the same name.Manman Ren2016-01-281-1/+2
| | | | | | | | | | | | | | | | | | | Add "enum ObjCPropertyQueryKind" to a few APIs that used to only take the name of the property: ObjCPropertyDecl::findPropertyDecl, ObjCContainerDecl::FindPropertyDeclaration, ObjCInterfaceDecl::FindPropertyVisibleInPrimaryClass, ObjCImplDecl::FindPropertyImplDecl, and Sema::ActOnPropertyImplDecl. ObjCPropertyQueryKind currently has 3 values: OBJC_PR_query_unknown, OBJC_PR_query_instance, OBJC_PR_query_class This extra parameter specifies that we are looking for an instance property with the given name, or a class property with the given name, or any property with the given name (if both exist, the instance property will be returned). rdar://23891898 llvm-svn: 259070
* Update for LLVM change.Benjamin Kramer2016-01-271-1/+1
| | | | llvm-svn: 258918
* Remove autoconf supportChris Bieneman2016-01-2612-516/+0
| | | | | | | | | | | | | | | | | Summary: This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html "This is the way [autoconf] ends Not with a bang but a whimper." -T.S. Eliot Reviewers: chandlerc, grosbach, bob.wilson, echristo Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D16472 llvm-svn: 258862
* [OpenMP] Parsing + sema for target parallel directive.Arpith Chacko Jacob2016-01-262-0/+11
| | | | | | | | | | | | | Summary: This patch adds parsing + sema for the target parallel directive and its clauses along with testcases. Reviewers: ABataev Differential Revision: http://reviews.llvm.org/D16553 Rebased to current trunk and updated test cases. llvm-svn: 258832
* [OpenMP] Parsing + sema for defaultmap clause.Arpith Chacko Jacob2016-01-261-0/+2
| | | | | | | | | | | Summary: This patch adds parsing + sema for the defaultmap clause associated with the target directive (among others). Reviewers: ABataev Differential Revision: http://reviews.llvm.org/D16527 llvm-svn: 258817
* clang-format-diff: Replace hard-code default for clang-format binary with flag.Daniel Jasper2016-01-201-9/+6
| | | | | | Patch by Kwasi Mensah, thank you. llvm-svn: 258328
* Silencing several -Wcast-qual warnings; NFC.Aaron Ballman2016-01-201-2/+4
| | | | llvm-svn: 258317
* [CMake] Creating add_clang_tool macro to wrap add_clang_executable and ↵Chris Bieneman2016-01-191-13/+1
| | | | | | | | | | generate install actions and targets. This change brings forward the LLVM convention that "executables" are just runnable binaries, and "tools" are executables that are part of the project's install. Having this abstraction will allow us to simplify some of the tool CMakeLists files, and it will standardize some of the install behaviors. llvm-svn: 258209
* [OpenMP] Parsing + sema for "target exit data" directive.Samuel Antao2016-01-192-0/+11
| | | | | | Patch by Arpith Jacob. Thanks! llvm-svn: 258177
* [OpenMP] Parsing + sema for "target enter data" directive.Samuel Antao2016-01-192-0/+11
| | | | | | Patch by Arpith Jacob. Thanks! llvm-svn: 258165
* [libclang] Introduce APIs for evaluating a cursor and checking if a macro is ↵Argyrios Kyrtzidis2016-01-163-70/+529
| | | | | | | | builtin/function. rdar://24091595 llvm-svn: 257968
* Avoid self-assignment of SmallString, trigger UB behavior down the road.Joerg Sonnenberger2016-01-151-3/+3
| | | | llvm-svn: 257947
* Add OpenMP dist_schedule clause to distribute directive and related ↵Carlo Bertolli2016-01-151-0/+5
| | | | | | regression tests. llvm-svn: 257917
* [CMake] Move the install logic for libclang's headers into the libclang ↵Chris Bieneman2016-01-141-0/+22
| | | | | | | | CMakelists This makes it so if you disable building libclang you won't install the headers as part of the 'install' target. llvm-svn: 257828
* Install scan-build and scan-view only if Static Analyzer was enabled.Eugene Zelenko2016-01-131-2/+2
| | | | llvm-svn: 257562
* D9600: Add scan-build python implementationLaszlo Nagy2016-01-1253-0/+5832
| | | | llvm-svn: 257533
* [OpenCL] Pipe type supportXiuli Pan2016-01-091-0/+4
| | | | | | | | | | | | | | | Summary: Support for OpenCL 2.0 pipe type. This is a bug-fix version for bader's patch reviews.llvm.org/D14441 Reviewers: pekka.jaaskelainen, Anastasia Subscribers: bader, Anastasia, cfe-commits Differential Revision: http://reviews.llvm.org/D15603 llvm-svn: 257254
* [libclang] Handle AutoType in clang_getTypeDeclarationSergey Kalinichev2016-01-072-0/+26
| | | | | | Differential Revision: http://reviews.llvm.org/D13001 llvm-svn: 257043
* Show inclusions from a preamble in clang_getInclusions.Erik Verbruggen2016-01-062-26/+72
| | | | | | | | | | | | | | | | When reparsing a translation unit with preamble generation turned on, no includes are found. This is due to the fact that all SLocs from AST/PCH files are skipped as they are 'loaded', and inclusions from a preamble are also 'loaded'. So, in case a file has a preamble, it first needs to process those loaded inclusions, and then check for any local inclusions. This latter one is for any includes that are not part of the preamble, like includes half-way through a file. This fixes PR24748. Differential Revision: http://reviews.llvm.org/D14329 llvm-svn: 256939
* [TrailingObjects] Convert OffsetOfExpr.James Y Knight2015-12-291-1/+0
| | | | | | That necessitated moving the OffsetOfNode class out of OffsetOfExpr. llvm-svn: 256590
* Refactor: Simplify boolean conditional return statements in tools/libclangAlexander Kornienko2015-12-283-21/+7
| | | | | | | | | | | | | | Summary: Use clang-tidy to simplify boolean conditional return statements. Reviewers: alexfh Subscribers: alexfh, chfast, cfe-commits Patch by Richard Thomson! Differential Revision: http://reviews.llvm.org/D10024 llvm-svn: 256498
* [TrailingObjects] Convert ASTTemplateKWAndArgsInfo and ↵James Y Knight2015-12-241-32/+45
| | | | | | | | | | | | | | | | | | | ASTTemplateArgumentListInfo. Doing so required separating them so that the former doesn't inherit from the latter anymore. Investigating that, it became clear that the inheritance wasn't actually providing real value in any case. So also: - Remove a bunch of redundant functions (getExplicitTemplateArgs, getOptionalExplicitTemplateArgs) on various Expr subclasses which depended on the inheritance relationship. - Switched external callers to use pre-existing accessors that return the data they're actually interested in (getTemplateArgs, getNumTemplateArgs, etc). - Switched internal callers to use pre-existing getTemplateKWAndArgsInfo. llvm-svn: 256359
* [clang-cl] Add support for /BreproDavid Majnemer2015-12-211-3/+8
| | | | | | | | | | | | The /Brepro flag controls whether or not the compiler should embed timestamps into the object file. Object files which do not embed timestamps are not suitable for incremental linking but are suitable for hermetic build systems and staged self-hosts of clang. A normal clang spelling of this flag has been added, -mincremental-linker-compatible. llvm-svn: 256204
* [scan-view] replace deprecated optparse with argparseAlexander Kornienko2015-12-211-45/+48
| | | | | | | | | | | | | | Summary: scan-view migrated from optparse deprecated Python module to its replacement (argparse) and resolved few conflicts with pep8 Reviewers: ddunbar, aaron.ballman, dcoughlin, jroelofs, zaks.anna Subscribers: cfe-commits Patch by Kirill Bobyrev! Differential Revision: http://reviews.llvm.org/D15370 llvm-svn: 256150
* [libclang] Add a flag to create the precompiled preamble on the first parse.Benjamin Kramer2015-12-153-4/+21
| | | | | | | | | | | | | | | | | | | | | Summary: The current default is to create the preamble on the first reparse, aka second parse. This is useful for clients that do not want to block when opening a file because serializing the preamble takes a bit of time. However, this makes the reparse much more expensive and that may be on the critical path as it's the first interaction a user has with the source code. YouCompleteMe currently optimizes for the first code interaction by parsing the file twice when loaded. That's just unnecessarily slow and this flag helps to avoid that. Reviewers: doug.gregor, klimek Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15490 llvm-svn: 255635
* [OPENMP 4.5] Parsing/sema for 'hint' clause of 'critical' directive.Alexey Bataev2015-12-151-0/+4
| | | | | | OpenMP 4.5 adds 'hint' clause to critical directive. Patch adds parsing/semantic analysis for this clause. llvm-svn: 255625
* Add parse and sema of OpenMP distribute directive with all clauses except ↵Carlo Bertolli2015-12-142-0/+11
| | | | | | dist_schedule llvm-svn: 255498
OpenPOWER on IntegriCloud