summaryrefslogtreecommitdiff
path: root/tools
Commit message (Collapse)AuthorAge
* Remove 'const' from MemoryBuffers used through the SourceManagerDavid Blaikie2014-06-27
| | | | | | | | | | | | | | This removes a const_cast added in r211884 that occurred due to an inconsistency in how MemoryBuffers are handled between some parts of clang and LLVM. MemoryBuffers are immutable and the general convention in the LLVM project is to omit const from immutable types as it's simply redundant/verbose (see llvm::Type, for example). While this change doesn't remove "const" from /every/ MemoryBuffer, it at least makes this chain of ownership/usage consistent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211915 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in my previous patch by restoring the behavior that the fatalChandler Carruth2014-06-27
| | | | | | | | | | | | | | error handler is only registered once. To avoid the use of std::call_once (the obvious way to do this) I've wrapped everything up into a managed static and done the work in a constructor. Silly, but it should be effective. Some out-of-tree libclang users reported this to me, and I've asked them to put together a test case which exhibits this behavior, but I wanted to fix things ASAP since the nature of the fix is straight forward. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211905 91177308-0d34-0410-b5e6-96231b3b80d8
* This fixes libclang to cope with the now compile-time multithreadedChandler Carruth2014-06-27
| | | | | | | | | selection re-enabled in r211900 in LLVM. The approach (unlike r211121) doesn't rely on std::mutex or std::call_once to avoid breaknig cygwin bots. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211901 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Parsing and sema analysis for 'copyprivate' clause.Alexey Bataev2014-06-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211886 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Initial parsing and sema analysis for 'single' directive.Alexey Bataev2014-06-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211774 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Initial parsing and sema analysis for 'section' directive.Alexey Bataev2014-06-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211767 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Initial support for 'sections' directive.Alexey Bataev2014-06-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211685 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r211121 (and r211285), "Change libclang initialization to use ↵NAKAMURA Takumi2014-06-24
| | | | | | | | std::call_once instead of" It broke mingw builder and cygwin-clang stage2, possibly lack of tls in <mutex>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211593 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Initial support for 'nowait' clause.Alexey Bataev2014-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211352 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Initial support for 'ordered' clause.Alexey Bataev2014-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211347 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Initial support for 'schedule' clause.Alexey Bataev2014-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211342 91177308-0d34-0410-b5e6-96231b3b80d8
* diagtool: refactor TreeView to resemble C++Alp Toker2014-06-20
| | | | | | | Replace lots of old-school parameter passing with neat class members. No attempt made yet to modernize loops, but it's a start. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211327 91177308-0d34-0410-b5e6-96231b3b80d8
* diagtool: simplify TreeView diagnostic classificationAlp Toker2014-06-19
| | | | | | This utility doesn't need to know about the specifics of diagnostic levels. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211323 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't call llvm_start_multithreaded() during init. As of LLVMZachary Turner2014-06-19
| | | | | | revision r211277, this function is essentially a no-op. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211285 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Initial support for '#pragma omp for' (fixed incompatibility with ↵Alexey Bataev2014-06-18
| | | | | | MSVC). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211140 91177308-0d34-0410-b5e6-96231b3b80d8
* Change libclang initialization to use std::call_once instead ofZachary Turner2014-06-17
| | | | | | | hand rolled once-initialization, and rename the mutex to be more descriptive of its actual purpose. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211121 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[OPENMP] Initial support for '#pragma omp for'."Rafael Espindola2014-06-17
| | | | | | | | This reverts commit r211096. Looks like it broke the msvc build: SemaOpenMP.cpp(140) : error C4519: default template arguments are only allowed on a class template git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211113 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Initial support for '#pragma omp for'.Alexey Bataev2014-06-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211096 91177308-0d34-0410-b5e6-96231b3b80d8
* actually, just check if it is a file (including directory or symlink)Sylvestre Ledru2014-06-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211053 91177308-0d34-0410-b5e6-96231b3b80d8
* Check that the directory does not exist.Sylvestre Ledru2014-06-16
| | | | | | | | | | | | | Otherwise, it could allows local users to obtain sensitive information or overwrite arbitrary files via a symlink attack on temporary directories with predictable names. Reported as CVE-2014-2893 ( https://security-tracker.debian.org/tracker/CVE-2014-2893 ) Found by Jakub Wilk git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211051 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Initial support of 'reduction' clauseAlexey Bataev2014-06-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211007 91177308-0d34-0410-b5e6-96231b3b80d8
* List the function/method name in the index page of scan-buildSylvestre Ledru2014-06-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210971 91177308-0d34-0410-b5e6-96231b3b80d8
* With the option '-analyzer-config stable-report-filename=true',Sylvestre Ledru2014-06-14
| | | | | | | | | | instead of report-XXXXXX.html, scan-build/clang analyzer generate report-<filename>-<function, method name>-<function position>-<id>.html. (id = i++ for several issues found in the same function/method) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210970 91177308-0d34-0410-b5e6-96231b3b80d8
* Refer to error_code with the std prefix.Rafael Espindola2014-06-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210817 91177308-0d34-0410-b5e6-96231b3b80d8
* Include system_error directly.Rafael Espindola2014-06-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210802 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace llvm::error_code with std::error_code.Rafael Espindola2014-06-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210780 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Clang changes to support LLVM removal of runtime multithreading"Zachary Turner2014-06-10
| | | | | | This reverts r210601. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210604 91177308-0d34-0410-b5e6-96231b3b80d8
* Clang changes to support LLVM removal of runtime multithreadingZachary Turner2014-06-10
| | | | | | | | | | support (llvm revision r210600). Reviewers: rnk Differential Revision: http://reviews.llvm.org/D4077 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210601 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Use 'nullptr'. Tools edition.Craig Topper2014-06-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210422 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid dubious IdentifierInfo::getNameStart() usesAlp Toker2014-06-07
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210403 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix C++ style // comments in a couple of C filesTimur Iskhodzhanov2014-06-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210325 91177308-0d34-0410-b5e6-96231b3b80d8
* Flush C stdio streams upon process terminationReid Kleckner2014-06-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210225 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Parsing/Sema for OMPLasprivateClause.Alexander Musman2014-06-04
| | | | | | | Parsing this clause, allowing it on directive ‘omp simd’ and semantic checks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210184 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the last remaining llvm/Config/config.h includesAlp Toker2014-06-04
| | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210145 91177308-0d34-0410-b5e6-96231b3b80d8
* cc1as: invert return bool to indicate failureAlp Toker2014-05-31
| | | | | | | | This simplifies code flow and matches the convention used in surrounding code. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209936 91177308-0d34-0410-b5e6-96231b3b80d8
* cc1as: fix a potential leak and unremoved output file in error conditionsAlp Toker2014-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209935 91177308-0d34-0410-b5e6-96231b3b80d8
* Parsing/Sema for OMPAlignedClause.Alexander Musman2014-05-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209816 91177308-0d34-0410-b5e6-96231b3b80d8
* Expose CUDA function attributes to the C interface.Eli Bendersky2014-05-28
| | | | | | | | | | Until now all CUDA-specific attributes were represented with CXCursor_UnexposedAttr; now they are actually implemented, including the Python bindings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209767 91177308-0d34-0410-b5e6-96231b3b80d8
* Parsing/Sema for OMPCollapseClause.Alexander Musman2014-05-27
| | | | | | | | Actual usage in Sema for collapsing loops will in some future patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209660 91177308-0d34-0410-b5e6-96231b3b80d8
* revert "r209526 List the function/method name in the index page of scan-build "Sylvestre Ledru2014-05-23
| | | | | | | | Depends on http://reviews.llvm.org/D3762 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209527 91177308-0d34-0410-b5e6-96231b3b80d8
* List the function/method name in the index page of scan-build Sylvestre Ledru2014-05-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209526 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace system() by native perl callsSylvestre Ledru2014-05-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209524 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-format: Introduce DisableFormat that prevents formatting.Daniel Jasper2014-05-22
| | | | | | | | | | | | | | | | | 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! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209446 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-format: Fix vim-integration for empty files.Daniel Jasper2014-05-22
| | | | | | Discovered by Ahmed Charles in http://reviews.llvm.org/D3018. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209417 91177308-0d34-0410-b5e6-96231b3b80d8
* RAV reunification: merge Lambda body visitation to DRAVAlp Toker2014-05-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209246 91177308-0d34-0410-b5e6-96231b3b80d8
* VirtualFileSystem: Add YAMLVFSWriter to generate VFS mapping filesJustin Bogner2014-05-20
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209241 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass -gdwarf-N options to integrated assemblerOliver Stannard2014-05-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209124 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide and use a safe Token::getRawIdentifier() accessorAlp Toker2014-05-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209061 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve a scan-build messageSylvestre Ledru2014-05-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208951 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch another write_escaped to yaml::escapeBen Langmuir2014-05-16
| | | | | | I missed one in r206443. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208941 91177308-0d34-0410-b5e6-96231b3b80d8