summaryrefslogtreecommitdiffstats
path: root/clang/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* Add the initial TypoExpr AST node for delayed typo correction.Kaelyn Takata2014-10-271-0/+1
| | | | llvm-svn: 220692
* clang-format: improve vim integration docsSaleem Abdulrasool2014-10-271-2/+2
| | | | | | | | | | Improve the documentation for vim integration of clang-format. Prefer the use of <c-o> to do the normal mode command execution to avoid side-effects of the escape and re-insertion (cursor movement). Tweak the macros to use a double return to avoid having to manually return control to the editor from the subprocess. llvm-svn: 220685
* Add frontend support for __vectorcallReid Kleckner2014-10-241-0/+1
| | | | | | | | | | | | | Wire it through everywhere we have support for fastcall, essentially. This allows us to parse the MSVC "14" CTP headers, but we will miscompile them because LLVM doesn't support __vectorcall yet. Reviewed By: Aaron Ballman Differential Revision: http://reviews.llvm.org/D5808 llvm-svn: 220573
* Driver: Include driver diagnostics when we --serialize-diagnosticsJustin Bogner2014-10-231-1/+15
| | | | | | | | | | | | | | | Currently, when --serialize-diagnostics is passed this only includes the diagnostics from clang -cc1, and driver diagnostics are dropped. This causes issues for tools that use the serialized diagnostics, since stderr is lost and these diagnostics aren't seen at all. We handle this by merging the diagnostics from the CC1 process and the driver diagnostics into a single file when the driver invokes CC1. Fixes rdar://problem/10585062 llvm-svn: 220525
* Refactor implementation of 'exclude header'.Richard Smith2014-10-231-5/+1
| | | | | | | | | This was not a real header role, and was never exposed to clients of ModuleMap. Remove the enumeration value for it and track it as marking the header as 'known' rather than creating an extra KnownHeader entry that *every single* client ignores. llvm-svn: 220460
* [OPENMP] Codegen for 'private' clause in 'parallel' directive.Alexey Bataev2014-10-211-1/+5
| | | | | | | This patch generates some helper variables which used as a private copies of the corresponding original variables inside an OpenMP 'parallel' directive. These generated variables are initialized by default (with the default constructor, if any). In outlined function references to original variables are replaced by the references to these private helper variables. At the end of the initialization of the private variables and implicit barier is set by calling __kmpc_barrier(...) runtime function to be sure that all threads were initialized using original values of the variables. Differential Revision: http://reviews.llvm.org/D4752 llvm-svn: 220262
* Driver: Make FailingCommand mandatory for generateCompilationDiagnosticsJustin Bogner2014-10-201-3/+7
| | | | | | | | | | | | | We currently use a null FailingCommand when generating crash reports as an indication that the cause is FORCE_CLANG_DIAGNOSTICS_CRASH, the environment variable that exists to test crash dumps. This means that our tests don't actually cover real crashes at all, and adds a more complicated code path that's only used in the tests. Instead, we can have the driver synthesize that every command failed and just call generateCompilationDiagnostics normally. llvm-svn: 220234
* Driver: support detecting driver mode when clang has a version suffix ↵Hans Wennborg2014-10-171-76/+81
| | | | | | | | | | | | | | without dash (PR21094) Clang would previously not get into C++ mode when invoked as 'clang++3.6' (though clang++-3.6 would work). I found the previous loop logic in this function confusing; hopefully this makes it a little clearer. Differential Revision: http://reviews.llvm.org/D5833 llvm-svn: 220052
* Speculatively fix GCC 4.7 build after r219938Hans Wennborg2014-10-161-1/+1
| | | | llvm-svn: 219941
* Use iterators and algorithms to possibly make this code a bit tidierDavid Blaikie2014-10-161-16/+12
| | | | | | | | | | | | | (also, the code executed once the element was found was split half inside the loop and half after it - now put it all together after the find operation) I'm a bit concerned that this code is rather untested (commenting out this whole function and running check-clang doesn't fail any tests)... And I wish I had polymorphic lambdas. llvm-svn: 219938
* Use array_lengthof; NFC.Hans Wennborg2014-10-161-1/+1
| | | | llvm-svn: 219935
* Add llvm_unreachable after switch to avoid warnings about a missingKaelyn Takata2014-10-151-0/+1
| | | | | | | | return. Forgot to add this in r219818. llvm-svn: 219820
* Drop unneccessary default case from switch introduced in r219809Kaelyn Takata2014-10-151-2/+0
| | | | | | | | This silences: ../tools/clang/tools/libclang/CIndex.cpp:6451:3: warning: default label in switch which covers all enumeration values [-Wcovered-switch-default] llvm-svn: 219818
* [analyzer] Perl scripts are run differently from makefiles. Sometimes ↵Anton Yartsev2014-10-152-0/+2
| | | | | | additional utilities are involved, e.g. 'env' utility that present in MSYS but is missing in MinGW. The patch unifies launch of "c++-analyzer" and "ccc-analyzer". llvm-svn: 219812
* [libclang] Add function to retrieve storage class in libclang.Argyrios Kyrtzidis2014-10-152-0/+36
| | | | | | Patch by guibufolo! llvm-svn: 219809
* Update for llvm api change.Rafael Espindola2014-10-151-3/+2
| | | | llvm-svn: 219800
* [analyzer] Handle 'mingw32-make' in the same way as 'make' and 'gmake'.Anton Yartsev2014-10-151-1/+1
| | | | llvm-svn: 219794
* Frontend: Don't accept null DiagnosticsEngines when building ASTUnitsJustin Bogner2014-10-151-1/+2
| | | | | | | | | | | | | The various ways to create an ASTUnit all take a refcounted pointer to a diagnostics engine as an argument, and if it isn't pointing at anything they initialize it. This is a pretty confusing API, and it really makes more sense for the caller to initialize the thing since they control the lifetime anyway. This fixes the one caller that didn't bother initializing the pointer and asserts that the argument is initialized. llvm-svn: 219752
* 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
* Add libclang capabilities to retriete template arguments from specializations.Eli Bendersky2014-10-103-2/+168
| | | | | | | | | Includes Python bindings. Reviewed in http://reviews.llvm.org/D5621 Patch by Rob Springer llvm-svn: 219529
* [OPENMP] 'omp teams' directive basic support.Alexey Bataev2014-10-092-0/+10
| | | | | | Includes parsing and semantic analysis for 'omp teams' directive support from OpenMP 4.0. Adds additional analysis to 'omp target' directive with 'omp teams' directive. llvm-svn: 219385
* Revert "[OPENMP] 'omp teams' directive basic support. Includes parsing and ↵Renato Golin2014-10-082-10/+0
| | | | | | | | | semantic analysis for 'omp teams' directive support from OpenMP 4.0. Adds additional analysis to 'omp target' directive with 'omp teams' directive." This reverts commit r219197 because it broke ARM self-hosting buildbots with segmentation fault errors in many tests. llvm-svn: 219289
* [OPENMP] 'omp teams' directive basic support.Alexey Bataev2014-10-072-0/+10
| | | | | | Includes parsing and semantic analysis for 'omp teams' directive support from OpenMP 4.0. Adds additional analysis to 'omp target' directive with 'omp teams' directive. llvm-svn: 219197
* driver: Map closed standard file descriptors to /dev/nullDavid Majnemer2014-10-061-0/+3
| | | | | | | | Utilize Process::FixupStandardFileDescriptors, introduced in r219170, to guard against files from being treated as one of the standard file descriptors. llvm-svn: 219174
* -ms-extensions: Implement __super scope specifier (PR13236).Nikola Smiljanic2014-09-262-0/+3
| | | | | | | | | We build a NestedNameSpecifier that records the CXXRecordDecl in which __super appeared. Name lookup is performed in all base classes of the recorded CXXRecordDecl. Use of __super is allowed only inside class and member function scope. llvm-svn: 218484
* [OPENMP] Parsing/Sema of directive omp parallel for simdAlexander Musman2014-09-232-0/+11
| | | | llvm-svn: 218299
* [OPENMP] Initial parsing/sema analysis of 'target' directive.Alexey Bataev2014-09-192-0/+10
| | | | llvm-svn: 218110
* Parsing/Sema of directive omp for simdAlexander Musman2014-09-182-0/+10
| | | | llvm-svn: 218029
* Use the simpler version of llvm::sys::fs::exists.Rafael Espindola2014-09-113-10/+4
| | | | | | | In all these cases it looks like the intention was to handle error in a similar way to the file not existing. llvm-svn: 217614
* Unique_ptrify PPCallbacks ownership.Craig Topper2014-09-101-2/+2
| | | | | | Unique_ptr creation stil needs to be moved earlier at some of the call sites. llvm-svn: 217474
* clang-format: [JS] Support regex literals with trailing escaped slash.Daniel Jasper2014-09-091-4/+1
| | | | | | | | | | | | | | | | | | Before: var regex = / a\//; int i; After: var regex = /a\//; int i; This required pushing the Lexer into its wrapper class and generating a new one in this specific case. Otherwise, the sequence get lexed as a //-comment. This is hacky, but I don't know a better way (short of supporting regex literals in the Lexer). Pushing the Lexer down seems to make all the call sites simpler. llvm-svn: 217444
* clang-format: [JS] Support alternative operator names as identifiers.Daniel Jasper2014-09-041-1/+1
| | | | | | | | | | Before: not. and . or . not_eq = 1; After: not.and.or.not_eq = 1; llvm-svn: 217179
* Use /usr/bin/env python instead of /usr/bin/python.Ed Schouten2014-09-022-2/+2
| | | | | | | | On operating systems like the BSDs, it is typically the case that /usr/bin/python does not exist. We should therefore use /usr/bin/env instead. This is also done in various other scripts in tools/. llvm-svn: 216945
* Use llvm::makeArrayRef instead of explicitly calling ArrayRef constructor ↵Craig Topper2014-08-302-2/+2
| | | | | | and mentioning the type. This works now that we have a conversion from ArrayRef<T*> to ArrayRef<const T*>. llvm-svn: 216824
* unique_ptrify the diagnostics in CXDiagnosticSetImplDavid Blaikie2014-08-293-27/+25
| | | | llvm-svn: 216754
* One other BuryPointer of a unique_ptr cleanup.David Blaikie2014-08-291-1/+1
| | | | llvm-svn: 216743
* [C++11] Support for capturing of variable length arrays in lambda expression.Alexey Bataev2014-08-281-1/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D4368 llvm-svn: 216649
* Update for LLVM api change.Rafael Espindola2014-08-273-9/+9
| | | | llvm-svn: 216585
* [libclang] Fixup the cursor spelling range for C++ destructors, operator ↵Argyrios Kyrtzidis2014-08-261-0/+12
| | | | | | | | overloads, and conversion functions. Patch by Craig Tenenbaum! llvm-svn: 216480
* Return a std::unique_ptr from getBufferForFile. NFC.Rafael Espindola2014-08-261-3/+1
| | | | llvm-svn: 216476
* Convert MC command line flag for fatal assembler warnings into a properJoerg Sonnenberger2014-08-261-1/+4
| | | | | | flag. llvm-svn: 216472
* Update for llvm api change.Rafael Espindola2014-08-251-7/+6
| | | | llvm-svn: 216397
* Fix PR17239 by changing the semantics of the RemainingArgsClass Option kindReid Kleckner2014-08-221-2/+27
| | | | | | | | | | | | | | | | | | | | | | | This patch aims at fixing PR17239. This bug happens because the /link (clang-cl.exe argument) is marked as "consume all remaining arguments". However, when inside a response file, /link should only consume all remaining arguments inside the response file where it is located, not the entire command line after expansion. The LLVM side of the patch will change the semantics of the RemainingArgsClass kind to always consume only until the end of the response file when the option originally came from a response file. There are only two options in this class: dash dash (--) and /link. This is the Clang side of the patch in http://reviews.llvm.org/D4899 Reviewered By: rafael, rnk Differential Revision: http://reviews.llvm.org/D4900 Patch by Rafael Auler! llvm-svn: 216281
* Update Clang for LLVM API change to use unique_ptr in ↵David Blaikie2014-08-211-1/+1
| | | | | | SourceManager::AddNewSourceBuffer llvm-svn: 216226
* [OPENMP] Extract common superclass from all the loop directives. No ↵Alexander Musman2014-08-191-3/+8
| | | | | | functional changes (having common superclass is convenient for future loop directives CodeGen implementation) llvm-svn: 215975
* Fix a memory leak in one of the test unit. Silent coverity warning CID 1095912Sylvestre Ledru2014-08-181-0/+1
| | | | llvm-svn: 215898
* [libclang] Introduce clang_File_isEqual for comparing CXFile handles.Argyrios Kyrtzidis2014-08-162-0/+13
| | | | llvm-svn: 215796
OpenPOWER on IntegriCloud