summaryrefslogtreecommitdiffstats
path: root/clang/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* Simplify git-clang-format by using new -lines option.Daniel Jasper2013-08-011-44/+12
| | | | | | Patch by Mark Lodato. Thank you! llvm-svn: 187592
* Fix up the BUILD_CLANG_ONLY code to work properly after r184794.Bob Wilson2013-07-261-2/+3
| | | | | | | | | | When BUILD_CLANG_ONLY is set to YES, it is supposed to simply limit the tools that get built. The change in r184794 broke this feature by moving libclang and c-index-test into PARALLEL_DIRS. Those are both supposed to be in DIRS, because c-index-test has a build dependency on libclang and cannot be reliably built in parallel with it. llvm-svn: 187246
* Don't forward all assembler arguments untouched to -cc1asDavid Blaikie2013-07-251-4/+2
| | | | | | | | | | | | | | Use the same filtering for assembly arguments to -cc1as as we do for -cc1, this allows a consistent (& more useful) diagnostic experience for users (rather than getting an error from -cc1as (which a user shouldn't really be thinking about) about --foo, they get an error from clang about --foo in -Wa,) I'm sort of surprised by the separation of -cc1as & the separate argument handling, etc, but at least this removes a little bit of the duplication. llvm-svn: 187156
* Remove support for CCC_ADD_ARGS. QA_OVERRIDE_GCC3_OPTIONS supersedes it.Rafael Espindola2013-07-231-19/+0
| | | | llvm-svn: 186983
* [libclang] Expose the rest of the array types.Argyrios Kyrtzidis2013-07-231-0/+24
| | | | | | Patch by Che-Liang Chiou! llvm-svn: 186967
* Revert commit 186833 (no longer needed after the fix in 186859).Enea Zaffanella2013-07-221-83/+46
| | | | llvm-svn: 186872
* Fix bug in clang-format's vim integration cause by r186789.Daniel Jasper2013-07-221-1/+1
| | | | | | | | After the first operation, the buffer contents has changed and thus all other operations would be invalid. Executing the operations in reversed order should fix this. llvm-svn: 186840
* c-index-test.c: Let this C89-compliant since r186817.NAKAMURA Takumi2013-07-221-46/+83
| | | | | | warning: initializer for aggregate is not a compile-time constant [-Wc99-extensions] llvm-svn: 186833
* Install git-clang-format along with clang-format by default.Daniel Jasper2013-07-221-3/+2
| | | | llvm-svn: 186825
* clang-format: Smarter replacement in the vim integration.Daniel Jasper2013-07-211-7/+6
| | | | | | | | | With this fix, only changed regions will be replaced in vim's buffer. Thereby, marks should mostly be left intact. Furthermore, this is a better fix for the performance problem in conjunction with 'foldmethod=syntax' (see r186660). llvm-svn: 186789
* Use -lines option instead of -offset/-length. This fixes problems with files ↵Alexander Kornienko2013-07-201-6/+3
| | | | | | using dos newlines (<CR><LF>). llvm-svn: 186740
* Add a cl.exe compatible driver modeHans Wennborg2013-07-193-1/+18
| | | | | | | The mode doesn't actually do anything yet, but this provides a way to get into it. llvm-svn: 186720
* Improve clang-format vim integration.Daniel Jasper2013-07-191-2/+2
| | | | | | | | The previous line-by-line replacement causes vim to take a long time if the foldmethod is set to 'syntax'. This should significantly improve performance in that case. llvm-svn: 186660
* OpenMP: basic support for #pragma omp parallelAlexey Bataev2013-07-193-0/+102
| | | | llvm-svn: 186647
* Added -lines X:Y option to specify line range to process. This is a more ↵Alexander Kornienko2013-07-181-16/+67
| | | | | | | | human-friendly alternative to -offset and -length. Differential Revision: http://llvm-reviews.chandlerc.com/D1160 llvm-svn: 186625
* Turn Driver::CCCIsCXX and CCCIsCPP into a single Mode enum,Hans Wennborg2013-07-181-16/+16
| | | | | | | | | | | | and add a new option --driver-mode= to control it explicitly. The CCCIsCXX and CCCIsCPP flags were non-overlapping, i.e. there are currently really three modes that Clang can run in: gcc, g++ or cpp, so it makes sense to represent them as an enum. Having a command line flag to control it helps testing. llvm-svn: 186605
* [Driver] Use LLVM's response file parser because it can read UTF-16Reid Kleckner2013-07-181-75/+16
| | | | | | | | | | | | MSBuild writes response files as UTF-16 little endian with a byte order mark. With this change, clang will be able to read them, although we still can't parse any of their flags. Adds a UTF-16-LE response file with a BOM for testing. Differential Revision: http://llvm-reviews.chandlerc.com/D1137 llvm-svn: 186603
* Update for llvm API change.Rafael Espindola2013-07-162-3/+3
| | | | llvm-svn: 186448
* Revert 186302 to fix build bots.Craig Topper2013-07-151-1/+1
| | | | llvm-svn: 186305
* Use llvm::array_lengthof to replace sizeof(array)/sizeof(array[0]).Craig Topper2013-07-151-1/+2
| | | | llvm-svn: 186302
* [scan-build] Add missing comma to ccc-analyzer.Jordan Rose2013-07-121-1/+1
| | | | | | Thanks, Dmitry! llvm-svn: 186167
* [scan-build] Pass through all -f and -O flags, along with -Wwrite-strings.Jordan Rose2013-07-111-16/+11
| | | | | | | | | | | | | These flags control language options and user-visible macros, so it's important to preserve them when analyzing. Rather than try to keep up with all the -f flags, we'll pass them all through and then ban the ones we don't want (like -fsyntax-only). -Wwrite-strings is really an f-flag in disguise: it implies -fconst-strings. Patch by Keaton Mowry, modified by me. llvm-svn: 186138
* c-index-test/CMakeLists.txt: Suggest -isystem to include libxml2 with ↵NAKAMURA Takumi2013-07-091-1/+1
| | | | | | include_directories(SYSTEM). llvm-svn: 185928
* c-index-test/Makefile: Use -isystem instead of -I on $(LIBXML2_INC) with ↵NAKAMURA Takumi2013-07-091-0/+8
| | | | | | | | | -Wdocumentation. -Wdocumentation won't seek -isystem. LIBXML2's headers in a certain distro might be incompatible to -Wdocumentation. FIXME: Could autoconf detect clang or availability of -isystem? llvm-svn: 185927
* Use SmallVectorImpl::reverse_iterator instead of SmallVector to avoid ↵Craig Topper2013-07-081-1/+1
| | | | | | specifying the vector size. llvm-svn: 185784
* [libclang] Add the new function to libclang.exportsArgyrios Kyrtzidis2013-07-051-0/+1
| | | | llvm-svn: 185725
* [libclang] Introduce clang_Cursor_isObjCOptional, which returns whether the ↵Argyrios Kyrtzidis2013-07-052-1/+16
| | | | | | | | declaration was affected by "@optional" rdar://14348525. llvm-svn: 185722
* Use SmallVectorImpl instead of SmallVector for iterators and references to ↵Craig Topper2013-07-043-6/+6
| | | | | | avoid specifying the vector size unnecessarily. llvm-svn: 185610
* [scan-build] Log compiler invocation to stderr, not stdout.Jordan Rose2013-07-031-4/+4
| | | | | | | | | | This is important for preprocessing steps, which may output to stdout. Also, change ENV accesses using barewords to use string keys instead. PR16414 llvm-svn: 185555
* With CLANG_ENABLE_STATIC_ANALYZER=0, link clang properly and skip clang-check.Jordan Rose2013-07-032-2/+8
| | | | | | | | | | | | | | | Previously, the CMake build still tried to link clang against the static analyzer libraries, even if CLANG_ENABLE_STATIC_ANALYZER was off. Furthermore, clang-check depends on the analyzer, so it should be disabled (in both CMake and configure builds). In theory, clang-check could be made to conditionally include analyzer support (like clang itself), but for now this at least gets a CMake ALL_BUILD working. Patch by Stephen Kelly, modified by me. llvm-svn: 185548
* Prevent error message when formatting an empty file.Daniel Jasper2013-07-031-0/+2
| | | | | | This fixes llvm.org/PR16514. llvm-svn: 185531
* Fix ranges computed by git clang-format.Daniel Jasper2013-07-021-2/+2
| | | | | | | | | | | | Before, the computed byte range would include the trailing newline. clang-format on the other hand counts whitespace as belonging to the following token, so that git-clang-format inadvertendly reformats the first unmodified line as well. It is not entirely clear whether clang-format's behavior itself should be modified, but for now this seems to be a safe change. llvm-svn: 185423
* Following the modification introduced in llvm by commit 185311Sylvestre Ledru2013-07-011-2/+2
| | | | | | | | | | | | | | | | | | The build system is currently miss-identifying GNU/kFreeBSD as FreeBSD. This kind of simplification is sometimes useful, but in general it's not correct. As GNU/kFreeBSD is an hybrid system, for kernel-related issues we want to match the build definitions used for FreeBSD, whereas for userland-related issues we want to match the definitions used for other systems with Glibc. The current modification adjusts the build system so that they can be distinguished, and explicitly adds GNU/kFreeBSD to the build checks in which it belongs. Fixes bug #16445. Patch by Robert Millan in the context of Debian. llvm-svn: 185312
* Bug fix: Make RecursiveASTVisitor<T>::TraverseLambdaExpr callJames Dennett2013-06-301-0/+2
| | | | | | | WalkUpFromLambdaExpr, so that the Visit* functions are called on that AST node. llvm-svn: 185277
* Use lexing mode based on FormatStyle.Standard.Alexander Kornienko2013-06-281-3/+4
| | | | | | | | | | | | | | | | | | | | | Summary: Some valid pre-C++11 constructs change meaning when lexed in C++11 mode, e.g. #define x(_a) printf("foo"_a); (example from http://llvm.org/bugs/show_bug.cgi?id=16342). "foo"_a is treated as a user-defined string literal when parsed in C++11 mode. In order to deal with this correctly, we need to set lexing mode according to which standard the code conforms to. We already have a configuration value for this (FormatStyle.Standard), which seems to be appropriate to use in this case as well. Reviewers: klimek CC: cfe-commits, gribozavr Differential Revision: http://llvm-reviews.chandlerc.com/D1028 llvm-svn: 185149
* Don't use PathV1.h in CIndexCodeCompletion.cpp.Rafael Espindola2013-06-261-3/+3
| | | | llvm-svn: 184940
* Remove dead include.Rafael Espindola2013-06-261-1/+0
| | | | llvm-svn: 184939
* Don't use PathV1.h in cc1as_main.cpp.Rafael Espindola2013-06-261-2/+2
| | | | llvm-svn: 184938
* Remove unused header.Rafael Espindola2013-06-261-1/+0
| | | | llvm-svn: 184937
* Use llvm::sys::fs::getMainExecutable.Rafael Espindola2013-06-262-9/+8
| | | | llvm-svn: 184915
* Reorder builds based by ordering.Eric Christopher2013-06-251-4/+4
| | | | llvm-svn: 184794
* [AST] Introduce a new DecayedType sugar nodeReid Kleckner2013-06-242-0/+12
| | | | | | | | | | | | | | The goal of this sugar node is to be able to look at an arbitrary FunctionType and tell if any of the parameters were decayed from an array or function type. Ultimately this is necessary to implement Microsoft's C++ name mangling scheme, which mangles decayed arrays differently from normal pointers. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D1014 llvm-svn: 184763
* Add some invalid-decl checks to clang_Type_getOffsetOf.Matt Beaumont-Gay2013-06-241-1/+3
| | | | | | | print-size-type.cpp was checking for specific record layout output for invalid decls; I've removed the checks but left the records as tests for not crashing. llvm-svn: 184751
* Comment parsing: allow "\param ..." to describe variadic argumentsDmitri Gribenko2013-06-241-16/+36
| | | | | | | | Original patch by Fariborz Jahanian; extended by me. Fixes rdar://14124644 llvm-svn: 184688
* Comment parsing: followup to r184610: allow multiple \returnsDmitri Gribenko2013-06-221-2/+2
| | | | | | | | | Remove unneeded member in CommentSema, add a test for the XML schema (the schema already allowed multiple paragraphs in <ResultDiscussion>, but there were no tests for that), fix HTML generation (it is not allowed to have <p> inside <dl>). llvm-svn: 184652
* [document parsing]: Allow multiple adjacent \return and the likeFariborz Jahanian2013-06-211-8/+13
| | | | | | | commands. Render them properly in XML output. // rdar://14207725 llvm-svn: 184610
* Update to pass in pointers intead of references.Bill Wendling2013-06-181-1/+1
| | | | llvm-svn: 184176
* Simplify a loop in ProcessCodeCompleteResults(). Pointed out by David BlaikieDmitri Gribenko2013-06-181-6/+6
| | | | llvm-svn: 184169
* ArrayRef'ize CodeCompletionContext::getNumSelIdents()Dmitri Gribenko2013-06-181-8/+6
| | | | llvm-svn: 184168
* Include PathV1.h only where it is used.Rafael Espindola2013-06-171-0/+1
| | | | llvm-svn: 184090
OpenPOWER on IntegriCloud