summaryrefslogtreecommitdiffstats
path: root/clang/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* Clang changes to support LLVM removal of runtime multithreadingZachary Turner2014-06-101-12/+5
| | | | | | | | | | support (llvm revision r210600). Reviewers: rnk Differential Revision: http://reviews.llvm.org/D4077 llvm-svn: 210601
* [C++11] Use 'nullptr'. Tools edition.Craig Topper2014-06-0831-265/+271
| | | | llvm-svn: 210422
* Avoid dubious IdentifierInfo::getNameStart() usesAlp Toker2014-06-071-1/+5
| | | | | | | | These cases in particular were incurring an extra strlen() when we already knew the length. They appear to be leftovers from when the interfaces worked with C strings that have continued to compile due to the implicit StringRef ctor. llvm-svn: 210403
* Fix C++ style // comments in a couple of C filesTimur Iskhodzhanov2014-06-062-4/+4
| | | | llvm-svn: 210325
* Flush C stdio streams upon process terminationReid Kleckner2014-06-052-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to what can only be described as a CRT bug, stdout and amazingly even stderr are not always flushed upon process termination, especially when the system is under high threading pressure. I have found two repros for this: 1) In lib\Support\Threading.cpp, change sys::Mutex to an std::recursive_mutex and run check-clang. Usually between 30 and 40 tests will fail. 2) Add OutputDebugStrings in code that runs during static initialization and static shutdown. This will sometimes generate similar failures. After a substantial amount of troubleshooting and debugging, I found that I could reproduce this from the command line without running check-clang. Simply make the mutex change described in #1, then manually run the following command many times by running it once, then pressing Up -> Enter very quickly: D:\src\llvm\build\vs2013\Debug\bin\c-index-test.EXE -cursor-at=D:\src\llvm\tools\clang\test\Index\targeted-preamble.h:2:15 D:\src\llvm\tools\clang\test\Index\targeted-cursor.c -include D:\src\llvm\build\vs2013\tools\clang\test\Index\Output\targeted-cursor.c.tmp.h -Xclang -error-on-deserialized-decl=NestedVar1 -Xclang -error-on-deserialized-decl=TopVar | D:\src\llvm\build\vs2013\Debug\bin\FileCheck.EXE D:\src\llvm\tools\clang\test\Index\targeted-cursor.c -check-prefix=PREAMBLE-CURSOR1 Sporadically they will fail, and attaching a debugger to a failed instance indicates that stdin of FileCheck.exe is empty. Note that due to the repro in #2, we can rule out a bug in the STL's mutex implementation, and instead conclude that this is a real flake in the windows test harness. Test Plan: Without patch: Ran check-clang 10 times and saw over 30 Unexpected failures on every run. With patch: Ran check-clang 10 times and saw 0 unexpected failures across all runs. Reviewers: rnk Differential Revision: http://reviews.llvm.org/D4021 Patch by Zachary Turner! llvm-svn: 210225
* [OPENMP] Parsing/Sema for OMPLasprivateClause.Alexander Musman2014-06-041-0/+4
| | | | | | Parsing this clause, allowing it on directive ‘omp simd’ and semantic checks. llvm-svn: 210184
* Remove the last remaining llvm/Config/config.h includesAlp Toker2014-06-043-5/+5
| | | | | | | | | | | | This corrects long-standing misuses of LLVM's internal config.h. In most cases the public llvm-config.h header was intended and we can now remove the old hacks thanks to LLVM r210144. The config.h header is private, won't be installed and should no longer be included by clang or other modules. llvm-svn: 210145
* cc1as: invert return bool to indicate failureAlp Toker2014-05-311-20/+13
| | | | | | | | This simplifies code flow and matches the convention used in surrounding code. No functional change. llvm-svn: 209936
* cc1as: fix a potential leak and unremoved output file in error conditionsAlp Toker2014-05-311-13/+17
| | | | llvm-svn: 209935
* Parsing/Sema for OMPAlignedClause.Alexander Musman2014-05-291-0/+4
| | | | llvm-svn: 209816
* Expose CUDA function attributes to the C interface.Eli Bendersky2014-05-282-0/+12
| | | | | | | | Until now all CUDA-specific attributes were represented with CXCursor_UnexposedAttr; now they are actually implemented, including the Python bindings. llvm-svn: 209767
* Parsing/Sema for OMPCollapseClause.Alexander Musman2014-05-271-0/+4
| | | | | | Actual usage in Sema for collapsing loops will in some future patch. llvm-svn: 209660
* revert "r209526 List the function/method name in the index page of scan-build "Sylvestre Ledru2014-05-231-13/+3
| | | | | | Depends on http://reviews.llvm.org/D3762 llvm-svn: 209527
* List the function/method name in the index page of scan-build Sylvestre Ledru2014-05-231-3/+13
| | | | llvm-svn: 209526
* Replace system() by native perl callsSylvestre Ledru2014-05-232-12/+14
| | | | llvm-svn: 209524
* clang-format: Introduce DisableFormat that prevents formatting.Daniel Jasper2014-05-221-1/+2
| | | | | | | | | | | | | | | | | And "none" pseudo-style indicating that formatting should be not applied. (1) Using .clang-format with "DisableFormat: true" effectively prevents formatting for all files within the folder containing such .clang-format file. (2) Using -fallback-style=none together with -style=file prevents formatting when .clang-format is not found, which can be used in on-save callback. Patch by Adam Strzelecki. Thank you! llvm-svn: 209446
* clang-format: Fix vim-integration for empty files.Daniel Jasper2014-05-221-1/+6
| | | | | | Discovered by Ahmed Charles in http://reviews.llvm.org/D3018. llvm-svn: 209417
* RAV reunification: merge Lambda body visitation to DRAVAlp Toker2014-05-201-5/+5
| | | | llvm-svn: 209246
* VirtualFileSystem: Add YAMLVFSWriter to generate VFS mapping filesJustin Bogner2014-05-201-141/+9
| | | | | | | | | This moves the logic to write a JSON VFS mapping from the C api into VirtualFileSystem, so that we can use it internally. No functional change. llvm-svn: 209241
* Pass -gdwarf-N options to integrated assemblerOliver Stannard2014-05-191-0/+9
| | | | llvm-svn: 209124
* Provide and use a safe Token::getRawIdentifier() accessorAlp Toker2014-05-171-6/+4
| | | | llvm-svn: 209061
* Improve a scan-build messageSylvestre Ledru2014-05-161-1/+5
| | | | llvm-svn: 208951
* Switch another write_escaped to yaml::escapeBen Langmuir2014-05-161-2/+2
| | | | | | I missed one in r206443. llvm-svn: 208941
* Eliminate DefaultImageName from the Driver constructorAlp Toker2014-05-151-1/+1
| | | | | | | | | | | | All callers were passing in "a.out" or garbage so a sensible default works fine here as a cleanup. This also brings about the possibility of adapting the value based on the driver's compatibility mode in future. The setting can still be changed via Driver::DefaultImageName as needed. llvm-svn: 208926
* [libclang] Introduce clang_Module_isSystem(), which returns non-zero if the ↵Argyrios Kyrtzidis2014-05-153-2/+10
| | | | | | given CXModule is a system one. llvm-svn: 208846
* [liblang] Introduce clang_getModuleForFile, which given a CXFile header ↵Argyrios Kyrtzidis2014-05-143-1/+36
| | | | | | file, returns the module that contains it, if one exists. llvm-svn: 208822
* clang-format: Add clang-format-diff usage examples for SVN.Daniel Jasper2014-05-141-1/+2
| | | | llvm-svn: 208766
* [scan-build] Pass --sysroot through for both compilation and linking.Jordan Rose2014-05-121-0/+1
| | | | | | PR19704 llvm-svn: 208595
* c-index-test: Don't leak diagnostic category text.Nico Weber2014-05-111-0/+1
| | | | llvm-svn: 208503
* Don't leak CXStrings for replacement fix-its in c-index-test.Nico Weber2014-05-101-1/+0
| | | | | | | | | | | | | | The loop body used to contain a switch statement; it looks like r96685 replaced that with an if/else if/else but accidentally left one of the three break statements from the switch behind, skipping the clang_disposeString() call for replacements (and the rest of the loop too, which apparently doesn't make a differences for the test cases we have). r96685: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20100215/027754.html This too might possibly the last leak in clang (PR19521). llvm-svn: 208483
* Decouple ExprCXX.h and DeclCXX.h and clean up includes a bit.Benjamin Kramer2014-05-101-1/+1
| | | | | | | Required pulling LambdaExpr::Capture into its own header. No functionality change. llvm-svn: 208470
* Don't leak the CXStoredDiagnostics returned by clang_codeCompleteGetDiagnostic()Nico Weber2014-05-091-2/+12
| | | | | | | | | | | | | | | | | r144269 changed clang_disposeDiagnostic() to be a no-op, but didn't update code completion diagnostics. Let CXCodeCompleteResults store all diagnostics returned by clang_codeCompleteGetDiagnostic() and then free them up in clang_disposeCodeCompleteResults(). Code completion diagnostics referred to data stored in CXCodeCompleteResults before already, so it wasn't possible to refer to the results of clang_codeCompleteGetDiagnostic() after clang_disposeCodeCompleteResults() before this change already -- hence this should be a safe, backwards-compatible change. Leak found by LSan, fixes PR19690. llvm-svn: 208454
* Enable alternative tokens by default for clang-format.Nikola Smiljanic2014-05-081-2/+2
| | | | | | Patch by Bobby Moretti. llvm-svn: 208269
* c-index-test: Don't leak the strings returned by makeClientContainer().Nico Weber2014-05-071-6/+37
| | | | llvm-svn: 208249
* Make 2 functions static, remove unneeded cast, rewrap. No behavior change.Nico Weber2014-05-071-10/+13
| | | | llvm-svn: 208247
* Update for llvm api change.Rafael Espindola2014-05-071-1/+0
| | | | llvm-svn: 208206
* [OPENMP] 'proc_bind' clause support - Parsing and sema analysis for OpenMP ↵Alexey Bataev2014-05-061-0/+2
| | | | | | clause 'proc_bind' llvm-svn: 208060
* [leaks] Parse the schema file every time we try to verify the XML. Yes,Chandler Carruth2014-05-021-29/+16
| | | | | | | | | | | | this is wasteful, blah blah, but this is a test utility only. It turns out that without doing this, libxml2 will always leak a bunch of the XML data, and that is causing failures with LSan. This is also quite a bit simpler and I don't think it is slow enough to really be a show stopper. If someone yells about the runtime of c-index-test, we can do other things to try to mitigate it, but the current strategy wasn't working well. llvm-svn: 207882
* [libclang] Add attribute support for 'pure', 'const' and 'noduplicate'.Joey Gouly2014-05-012-0/+9
| | | | | | This bumps CINDEX_VERSION_MINOR up (to 26). llvm-svn: 207767
* scan-build: Don't use realpath when the user provides an explicit path.Jordan Rose2014-04-291-1/+1
| | | | | | PR19583 llvm-svn: 207484
* Follow-up to r207071: Let newFrontendActionFactory() return a unique_ptr.Nico Weber2014-04-281-2/+2
| | | | | | This exposed a leak, fix that. llvm-svn: 207396
* libclang: split out the documentation comment APIAlp Toker2014-04-284-12/+16
| | | | | | | | | | | | | | | | | It's possible that the "comment AST" may be replaced or split out in the midterm, any anyway this makes the headers easier to read. Developers don't currently need to include "clang-c/Documentation.h" explicitly and there's no macro to test for availability yet. The raw comment and brief comment accessors have been kept in Index.h though brief support may also move here as a separate proposal. This is not a deprecation, just a gentle separation of concerns as we look to simplify the built-in representation of comment nodes and support external comment processors. llvm-svn: 207392
* c-arcmt-test/Makefile: Update USEDLIBS for -static.NAKAMURA Takumi2014-04-271-1/+4
| | | | llvm-svn: 207340
* libclang: remove 'CXDiagnostic_Remark'Alp Toker2014-04-264-4/+4
| | | | | | | | | | | | | | | | 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
* Simplify leak fix of r207076, by just disposing the previous CXString.Argyrios Kyrtzidis2014-04-241-9/+2
| | | | llvm-svn: 207081
* Fix two leaks found by LSan.Nico Weber2014-04-241-1/+11
| | | | | | | | A CursorPlatformAvailability can have several "unavailable" attributes, don't leak all but the first. I'm not sure if there can be several "deprecate"ds too, but add the same logic there to keep the two code paths looking the same. llvm-svn: 207076
* Fix two leaks in c-index-test found by LSan.Nico Weber2014-04-241-6/+14
| | | | | | The result of clang_getCursorSpelling() needs to be clang_getCursorSpelling()ed. llvm-svn: 207073
* Update Target::createMCAsmParser calls for the LLVM interface change.Evgeniy Stepanov2014-04-231-1/+5
| | | | | | Patch by Yuri Gorshenin. llvm-svn: 206970
* Attempt to fix null ASTContext in ASTUnit error pathBen Langmuir2014-04-221-1/+1
| | | | | | | | | We don't need the ASTContext for the diagnostics, only the language options, which we can get from the compiler invocation. It worries me how many categorically different states the ASTUnit class can be in depending on how it is being constructed/used. llvm-svn: 206909
* [OPENMP] parsing 'linear' clause (for directive 'omp simd')Alexander Musman2014-04-221-0/+4
| | | | | | Differential Revision: http://reviews.llvm.org/D3272 llvm-svn: 206891
OpenPOWER on IntegriCloud