summaryrefslogtreecommitdiffstats
path: root/clang/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* [CMake] arcmt-test: Reorganize link libraries with *actually referenced* ↵NAKAMURA Takumi2014-01-311-6/+3
| | | | | | | | libs from arcmt-test.cpp. arcmt-test doesn't depend on llvm codegen. llvm-svn: 200563
* [CMake] clang doesn't care whether CLANG_ENABLE_*(s) were set or not.NAKAMURA Takumi2014-01-311-21/+0
| | | | llvm-svn: 200533
* libclang/Makefile: Reorder libraries.NAKAMURA Takumi2014-01-311-3/+6
| | | | llvm-svn: 200508
* Update for llvm api change.Rafael Espindola2014-01-261-1/+1
| | | | llvm-svn: 200136
* Rename getResultLoc() tooAlp Toker2014-01-251-3/+3
| | | | | | | | Follow up to r200082. Spotted by Dmitri llvm-svn: 200105
* Rename getResultType() on function and method declarations to getReturnType()Alp Toker2014-01-253-5/+5
| | | | | | | | | | | | | | | A return type is the declared or deduced part of the function type specified in the declaration. A result type is the (potentially adjusted) type of the value of an expression that calls the function. Rule of thumb: * Declarations have return types and parameters. * Expressions have result types and arguments. llvm-svn: 200082
* [CMake] libclang: Update GENERATED_HEADERS with actually used.NAKAMURA Takumi2014-01-241-0/+2
| | | | | | | + ClangAttrVisitor + ClangCommentCommandList llvm-svn: 199999
* [CMake] Move LIBCLANG_BUILD_STATIC above. NFC.NAKAMURA Takumi2014-01-231-3/+3
| | | | llvm-svn: 199903
* [CMake] Parameterize MODULE and SHARED in add_clang_library().NAKAMURA Takumi2014-01-231-2/+1
| | | | llvm-svn: 199902
* [analyzer] Strip trailing whitespace characters from input.Anton Yartsev2014-01-231-3/+2
| | | | | | More universal way of removing trailing whitespace characters then 'chomp' does. Chomp "removes any trailing string that corresponds to the current value of $/" (quote from perldoc). In my case an input ended with '\r\r\n', chomp left '\r' at the end of input and the script ended up with an error "Use of uninitialized value in concatenation (.) or string" llvm-svn: 199892
* [CMake][MS] libclang: Invalidate LLVM_EXPORTED_SYMBOL_FILE to suppress LNK4197.NAKAMURA Takumi2014-01-221-0/+7
| | | | | | | Each functions is exported as "dllexport" in include/clang-c. See also KB835326. llvm-svn: 199799
* Introduce and use Decl::getAsFunction() to simplify templated function checksAlp Toker2014-01-221-18/+6
| | | | | | | | | | | | | | Lift the getFunctionDecl() utility out of the parser into a general Decl::getAsFunction() and use it to simplify other parts of the implementation. Reduce isFunctionOrFunctionTemplate() to a simple type check that works the same was as the other is* functions and move unwrapping of shadowed decls to callers so it doesn't get run twice. Shuffle around canSkipFunctionBody() to reduce virtual dispatch on ASTConsumer. There's no need to query when we already know the body can't be skipped. llvm-svn: 199794
* Correct various uses of 'argument' that in fact refer to function parametersAlp Toker2014-01-211-2/+2
| | | | | | Cleanup only. llvm-svn: 199773
* clang-format: Enable formatting for .proto and .protodevel files.Daniel Jasper2014-01-211-1/+2
| | | | | | Support for protocol buffer files seems complete enough. llvm-svn: 199750
* Update FunctionTypeLoc and related names to match r199686Alp Toker2014-01-211-4/+4
| | | | llvm-svn: 199699
* Rename FunctionProtoType accessors from 'arguments' to 'parameters'Alp Toker2014-01-201-4/+4
| | | | | | | | | | | | | | | | | Fix a perennial source of confusion in the clang type system: Declarations and function prototypes have parameters to which arguments are supplied, so calling these 'arguments' was a stretch even in C mode, let alone C++ where default arguments, templates and overloading make the distinction important to get right. Readability win across the board, especially in the casting, ADL and overloading implementations which make a lot more sense at a glance now. Will keep an eye on the builders and update dependent projects shortly. No functional change. llvm-svn: 199686
* [CMake] Apply ADDITIONAL_HEADERS introduced in r199639.NAKAMURA Takumi2014-01-201-9/+11
| | | | llvm-svn: 199640
* [CMake] Deprecate CLANG_RUNTIME_OUTPUT_INTDIR and CLANG_LIBRARY_OUTPUT_INTDIR.NAKAMURA Takumi2014-01-191-5/+5
| | | | | | LLVM_*_OUTPUT_INTDIR should be available everywhere. It was my mistake when I introduced INTDIR stuff. llvm-svn: 199597
* Rename QA_OVERRIDE_GCC3_OPTIONS to CCC_OVERRIDE_OPTIONS. <rdar://14578381>Bob Wilson2014-01-151-4/+8
| | | | | | | Continue to accept the old name for a while to make it an easier transition for people who rely on this. llvm-svn: 199283
* Use -std=gnu89 in tools/c-index-test/CMakeLists.txtRafael Espindola2014-01-081-1/+1
| | | | | | | | | With the old use of -std=c89 off_t is not defined and the build fails. This seems to be another variation of http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40278. llvm-svn: 198748
* [analyzer] Files with .c extensions are still C++ files if the compiler is CXX.Jordan Rose2014-01-071-4/+10
| | | | | | PR18339 llvm-svn: 198711
* Shorten the output of `clang-format --version`, include revision number.Nico Weber2014-01-071-0/+7
| | | | | | | | | | | | | | | | | Before: $ clang-format --version LLVM (http://llvm.org/): LLVM version 3.5svn Optimized build with assertions. Built Jan 3 2014 (14:28:46). Default target: x86_64-apple-darwin13.0.0 Host CPU: core-avx-i Now: $ bin/clang-format --version clang-format version 3.5 (198452) llvm-svn: 198694
* Sort all the #include lines with LLVM's utils/sort_includes.py whichChandler Carruth2014-01-076-9/+9
| | | | | | | 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
* CMake separate projects: finish output-directory changes.Douglas Gregor2014-01-021-4/+4
| | | | | | | Make sure clang-tblgen, clang++, and clang-cl get created in the Clang binary build directory. llvm-svn: 198331
* CMake: Unbreak separated LLVM/Clang project builds for Xcode.Douglas Gregor2014-01-021-4/+6
| | | | | | | | | | | | | The separate Xcode project generated for Clang is putting the clang executables into the same location where the LLVM executables are going. This is wrong, and breaks the Clang build because we try to create clang++ and clang-cl symlinks in the wrong place and to the wrong place. As a stop-gap to get these builds working again, teach the symlink generation to point into the LLVM executable directory instead. llvm-svn: 198319
* Eliminate UnaryTypeTraitExprAlp Toker2014-01-012-6/+0
| | | | | | | | | | | | | Remove UnaryTypeTraitExpr and switch all remaining type trait related handling over to TypeTraitExpr. The UTT/BTT/TT enum prefix and evaluation code is retained pending further cleanup. This is part of the ongoing work to unify type traits following the removal of BinaryTypeTraitExpr in r197273. llvm-svn: 198271
* Port r198088 (set NO_DEAD_STRIP for clang) from make to cmake.Nico Weber2013-12-302-2/+4
| | | | | | | | Also stop setting passing -dead_strip explicitly for libclang and instead rely on this now happening by default. (And make it happen by default for add_clang_library, which doesn't use the library cmake functions from llvm.) llvm-svn: 198200
* Use LLVM_EXPORTED_SYMBOL_FILE in libclang's cmake build.Nico Weber2013-12-291-1/+1
| | | | | | Now the exports file should have an effect on non-darwin too. llvm-svn: 198176
* Briefly document diag-build.shAlp Toker2013-12-281-0/+9
| | | | | | | | | It may be a quick and dirty script but it's still useful to have some indication as to its purpose. Text taken straight from Jordan's r158682 commit message. llvm-svn: 198128
* Set NO_DEAD_STRIP for clang after llvm r198087.Nico Weber2013-12-272-3/+3
| | | | llvm-svn: 198088
* Bury leaked pointers in a global array to silence a leak detector in ↵Kostya Serebryany2013-12-271-1/+2
| | | | | | | | | | | | | | | | --disable-free mode Summary: This is an alternative to http://llvm-reviews.chandlerc.com/D2475 suggested by Chandler. Reviewers: chandlerc, rnk, dblaikie CC: cfe-commits, earthdok Differential Revision: http://llvm-reviews.chandlerc.com/D2478 llvm-svn: 198073
* Move tools/libclang/RecursiveASTVisitor.h -> ↵Argyrios Kyrtzidis2013-12-203-2392/+5
| | | | | | | | include/clang/AST/DataRecursiveASTVisitor.h This is to make it available so the static analyzer can use it. llvm-svn: 197766
* Fix usage description of clang-format-diff.py.Daniel Jasper2013-12-191-2/+2
| | | | llvm-svn: 197668
* clang-format-diff.py: fix -regex/-iregex matchingAlp Toker2013-12-181-4/+4
| | | | | | | | | | While debating the finer points of file extension matching, we somehow missed the bigger problem that the current code will match anything starting with the default or user-specified pattern (e.g. lit.site.cfg.in). Fix this by doing what find(1) does, implicitly wrapping the pattern with ^$. llvm-svn: 197608
* clang-format-diff.py: add the OpenCL file extensionAlp Toker2013-12-181-1/+1
| | | | | | It's handled correctly as a C-family language. llvm-svn: 197542
* [CMake] Introduce CLANG_RUNTIME_OUTPUT_INTDIR and CLANG_LIBRARY_OUTPUT_INTDIR.NAKAMURA Takumi2013-12-161-3/+3
| | | | llvm-svn: 197395
* Added -iregex for case-insensitive regex to filter file names.Alexander Kornienko2013-12-161-5/+13
| | | | | | | | | | | | | | | | | Summary: -regex and -iregex both mimic options of the find utility. Made the default list of extensions case-insensitive, so that it's not only C and CPP extensions are accepted in upper case. Reviewers: djasper Reviewed By: djasper CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2415 llvm-svn: 197378
* Eliminate BinaryTypeTraitExprAlp Toker2013-12-133-12/+0
| | | | | | | | | | | | | | | | | There's nothing special about type traits accepting two arguments. This commit eliminates BinaryTypeTraitExpr and switches all related handling over to TypeTraitExpr. Also fixes a CodeGen failure with variadic type traits appearing in a non-constant expression. The BTT/TT prefix and evaluation code is retained as-is for now but will soon be further cleaned up. This is part of the ongoing work to unify type traits. llvm-svn: 197273
* [analyzer] Add -analyzer-config to scan-build.Jordan Rose2013-12-132-2/+22
| | | | | | | | | -analyzer-config options are now passed from scan-build through to ccc-analyzer and then to clang. Patch by Daniel Connelly! llvm-svn: 197246
* Filter-out irrelevant command-line options in CommonOptionsParser.Alexander Kornienko2013-12-121-27/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Leave only -help, -version and options from the specified category. Updated clang-check and clang-tidy. As clang-tidy is in a separate repository, here's the diff: Index: tools/extra/clang-tidy/tool/ClangTidyMain.cpp =================================================================== --- tools/extra/clang-tidy/tool/ClangTidyMain.cpp (revision 197024) +++ tools/extra/clang-tidy/tool/ClangTidyMain.cpp (working copy) @@ -39,7 +39,7 @@ // FIXME: Add option to list name/description of all checks. int main(int argc, const char **argv) { - CommonOptionsParser OptionsParser(argc, argv); + CommonOptionsParser OptionsParser(argc, argv, ClangTidyCategory); SmallVector<clang::tidy::ClangTidyError, 16> Errors; clang::tidy::runClangTidy(Checks, OptionsParser.getCompilations(), Reviewers: djasper, klimek Reviewed By: djasper CC: cfe-commits, revane, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D2379 llvm-svn: 197139
* c-arcmt-test/Makefile: Fixup for LDFLAGS=-static on cygming, corresponding ↵NAKAMURA Takumi2013-12-121-0/+1
| | | | | | to r197116. llvm-svn: 197129
* Fix autoconf build in libclang since r197075, (has been reverted in r197111).NAKAMURA Takumi2013-12-121-0/+1
| | | | llvm-svn: 197114
* clang-format-diff.py: Support -regex filter and more filename extensionsAlp Toker2013-12-101-4/+5
| | | | | | | | | | | | | Add support for more filename extensions based on the list in the clang plus JavaScript. Also adds a -regex option so users can override defaults if they have unusual file extensions or want to format everything in the diff. Keeping with tradition the flag is modelled on Unix conventions, this time matching the semantics of find(1). llvm-svn: 196917
* [CMake] Update target_link_libraries() and LLVM_LINK_COMPONENTS for each ↵NAKAMURA Takumi2013-12-107-59/+31
| | | | | | CMakeLists.txt. llvm-svn: 196916
* Add ObjCARCOpts to LINK_COMPONENTS.NAKAMURA Takumi2013-12-101-1/+2
| | | | llvm-svn: 196915
* [libclang] Rename CXSkippedRanges to CXSourceRangeList to make it more ↵Argyrios Kyrtzidis2013-12-063-9/+9
| | | | | | | | future-proof. Suggested by Alp Toker. llvm-svn: 196591
* [c-index-test] For the '-remap-file' option use a comma for separator which ↵Argyrios Kyrtzidis2013-12-051-7/+7
| | | | | | | | is more Windows friendly than the colon. llvm-svn: 196529
* clang-format vsix cmake build: use ${LLVM_TOOLS_BINARY_DIR}/${CMAKE_CFG_INTDIR}Hans Wennborg2013-12-051-2/+2
| | | | | | | | as the location for grabbing clang-format.exe, and also output the .vsix here. This allows us to find clang-format.exe when building from a MSVC Solution. llvm-svn: 196512
* Fix a tranche of comment, test and doc typosAlp Toker2013-12-052-2/+2
| | | | llvm-svn: 196510
* [libclang] Record ranges skipped by the preprocessor and expose them with ↵Argyrios Kyrtzidis2013-12-053-0/+57
| | | | | | | | libclang. Patch by Erik Verbruggen! llvm-svn: 196487
OpenPOWER on IntegriCloud