summaryrefslogtreecommitdiffstats
path: root/clang/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* Add _Float16 as a C/C++ source language typeSjoerd Meijer2017-09-081-1/+3
| | | | | | | | | | | This adds _Float16 as a source language type, which is a 16-bit floating point type defined in C11 extension ISO/IEC TS 18661-3. In follow up patches documentation and more tests will be added. Differential Revision: https://reviews.llvm.org/D33719 llvm-svn: 312781
* Update for llvm change.Rafael Espindola2017-09-082-2/+6
| | | | llvm-svn: 312766
* [diagtool] Change default tree behavior to print only flagsJonas Devlieghere2017-09-051-9/+27
| | | | | | | | | | | | | | This patch changes the default behavior of `diagtool tree` to only display warning flags and not the internal warnings flags. The latter is an implementation detail of the compiler and usually not what the users wants. Furthermore, flags that are enabled by default are now also printed in green. Originally, this was only the case for the diagnostic names. Differential revision: https://reviews.llvm.org/D37390 llvm-svn: 312546
* [NFC] Loop modernization in diagtoolJonas Devlieghere2017-09-055-62/+57
| | | | | | Precommit for https://reviews.llvm.org/D37390 llvm-svn: 312545
* [clang-format] Fix lines=all case in clang-format.pyKrasimir Georgiev2017-09-051-1/+1
| | | | llvm-svn: 312536
* [libclang]: Honor LIBCLANG_NOTHREADS for clang_parseTranslationUnit*Erik Verbruggen2017-08-291-0/+6
| | | | | | | | | | | | | | | | | Looks like this one was forgotten for clang_parseTranslationUnit*, as LIBCLANG_NOTHREADS is checked for/in: clang_saveTranslationUnit() clang_reparseTranslationUnit() clang_codeCompleteAt() clang_indexTranslationUnit() clang_indexSourceFile() Patch by Nikolai Kosjar! Differential Revision: https://reviews.llvm.org/D36821 llvm-svn: 311990
* Use class to pass information about executable nameSerge Pavlov2017-08-291-18/+12
| | | | | | | | | | | | | Information about clang executable name components, such as target and driver mode, was passes in std::pair. With this change it is passed in a special structure. It improves readability and makes access to this information more convenient. NFC. Differential Revision: https://reviews.llvm.org/D36057 llvm-svn: 311981
* Fix ClangFormatFuzzer.George Karpenkov2017-08-241-2/+5
| | | | llvm-svn: 311621
* [clang-proto-fuzzer] Fix clang-proto-to-cxx build.Matt Morehouse2017-08-232-0/+2
| | | | llvm-svn: 311592
* [clang-diff] Properly clear the selection in HTML diffJohannes Altmanninger2017-08-231-2/+2
| | | | | | | | | | Reviewers: arphaman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D37072 llvm-svn: 311575
* [clang-diff] HTML diff navigationJohannes Altmanninger2017-08-231-9/+56
| | | | | | | | | | | | | | Summary: This adds shortcuts j and k to jump between changes. It is especially useful in diffs with few changes. Reviewers: arphaman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D36685 llvm-svn: 311570
* Update Clang fuzzers to use libFuzzer bundled with the toolchain.George Karpenkov2017-08-232-5/+4
| | | | | | Differential Revision: https://reviews.llvm.org/D37043 llvm-svn: 311516
* [clang-diff] Refactor stop-after command-line flagJacob Gravelle2017-08-221-1/+1
| | | | | | | | | | | | | | | Summary: Rename stop-after to stop-diff-after. When building LLVM with -DLLVM_BUILD_LLVM_DYLIB=ON, stop-after collides with the stop-after already present in LLVM. Reviewers: johannes, arphaman Subscribers: klimek, aheejin, cfe-commits Differential Revision: https://reviews.llvm.org/D36989 llvm-svn: 311476
* [clang-format] Fix lines regression in clang-format.pyKrasimir Georgiev2017-08-221-1/+1
| | | | | | | | | | | | | | | | Summary: This patch fixes a regression after https://reviews.llvm.org/rL305665, which updates the structure of the `lines` variable. Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D37011 llvm-svn: 311456
* [clang-proto-fuzzer] Update README.Matt Morehouse2017-08-211-8/+15
| | | | | | Add instructions on how to modify the compiler invocation. llvm-svn: 311345
* [clang-diff] Improve and test getNodeValueJohannes Altmanninger2017-08-201-0/+12
| | | | | | | | | | | | Summary: Use qualified names if available. Reviewers: arphaman Subscribers: klimek Differential Revision: https://reviews.llvm.org/D36186 llvm-svn: 311292
* [clang-diff] Fix similarity computationJohannes Altmanninger2017-08-201-0/+13
| | | | | | | | | | | | | | Summary: Add separate tests for the top-down and the bottom-up phase, as well as one for the optimal matching. Reviewers: arphaman Subscribers: klimek Differential Revision: https://reviews.llvm.org/D36185 llvm-svn: 311284
* [clang-diff] Fix compiler warningJohannes Altmanninger2017-08-191-0/+1
| | | | llvm-svn: 311249
* [clang-diff] Add HTML side-by-side diff outputJohannes Altmanninger2017-08-192-0/+173
| | | | | | | | | | Reviewers: arphaman Subscribers: mgorny Differential Revision: https://reviews.llvm.org/D36182 llvm-svn: 311241
* [clang-diff] Fix warning about useless comparisonJohannes Altmanninger2017-08-191-1/+1
| | | | llvm-svn: 311240
* [clang-diff] Make printing of matches optionalJohannes Altmanninger2017-08-191-1/+5
| | | | | | | | | | Reviewers: arphaman Subscribers: klimek Differential Revision: https://reviews.llvm.org/D36181 llvm-svn: 311237
* [clang-diff] Add option to dump the AST, one node per lineJohannes Altmanninger2017-08-191-2/+20
| | | | | | | | | | | | Summary: This is done with -ast-dump; the JSON variant has been renamed to -ast-dump-json. Reviewers: arphaman Differential Revision: https://reviews.llvm.org/D36180 llvm-svn: 311232
* Revert "Revert "[clang-diff] Move printing of matches and changes to ↵Johannes Altmanninger2017-08-191-6/+67
| | | | | | | | | | clang-diff"" Fix build by renaming ChangeKind -> Change This reverts commit 0c78c5729f29315d7945988efd048c0cb86c07ce. llvm-svn: 311222
* Revert "Revert "[clang-diff] Move the JSON export function to clang-diff""Johannes Altmanninger2017-08-191-1/+64
| | | | | | | This reverts commit eac4c13ac9ea8f12bc049e040c7b9c8a517f54e7, the original commit *should* not have caused the build failure. llvm-svn: 311216
* Revert "[clang-diff] Move the JSON export function to clang-diff"Vlad Tsyrklevich2017-08-181-64/+1
| | | | | | This reverts commit r311199, it was causing widespread build failures. llvm-svn: 311211
* Revert "[clang-diff] Move printing of matches and changes to clang-diff"Vlad Tsyrklevich2017-08-181-67/+6
| | | | | | This reverts commit r311200, it was causing widespread build failures. llvm-svn: 311210
* [clang-diff] Move printing of matches and changes to clang-diffJohannes Altmanninger2017-08-181-6/+67
| | | | | | | | | | | | | | | Summary: This also changes the output order of the changes. Now the matches are printed in pre-order, intertwined with insertions, updates, and moves. Deletions are printed afterwards. Reviewers: arphaman Subscribers: klimek Differential Revision: https://reviews.llvm.org/D36179 llvm-svn: 311200
* [clang-diff] Move the JSON export function to clang-diffJohannes Altmanninger2017-08-181-1/+64
| | | | | | | | | | Reviewers: arphaman Subscribers: klimek Differential Revision: https://reviews.llvm.org/D36178 llvm-svn: 311199
* [clang-proto-fuzzer] Allow user-specified compiler arguments.Matt Morehouse2017-08-181-1/+17
| | | | | | | | | | | | | | | | | | | Summary: Arguments can be specified after -ignore_remaining_args=1 to modify the compiler invocation. For example, the following command-line will fuzz LLVM with a custom optimization level and target triple: clang-proto-fuzzer CORPUS/ -ignore_remaining_args -O3 \ -triple arm64-apple-ios9 Reviewers: vitalybuka, kcc Reviewed By: vitalybuka Subscribers: aemerson, cfe-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D36882 llvm-svn: 311185
* [clang-diff] Add commandline arguments.Johannes Altmanninger2017-08-181-18/+54
| | | | | | | | | | | | | | | | Summary: Support command line options for build path and extra arguments This emulates the options accepted by clang tools that use CommonOptionsParser. Add a flag for controlling the maximum size parameter for bottom up matching. Reviewers: arphaman Subscribers: klimek Differential Revision: https://reviews.llvm.org/D36177 llvm-svn: 311173
* [index] Add indexing for unresolved-using declarationsBen Langmuir2017-08-161-0/+1
| | | | | | | | | | | In dependent contexts we end up referencing these, so make sure they have USRs, and have their declarations indexed. For the most part they behave like typedefs, but we also need to worry about having multiple using declarations with the same "name". rdar://problem/33883650 llvm-svn: 311053
* clang-format: add an option -verbose to list the files being processedSylvestre Ledru2017-08-121-16/+16
| | | | | | | | | | | | | | Reviewers: djasper Reviewed By: djasper Subscribers: klimek, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D34824 llvm-svn: 310778
* Add a Dockerfile for clang-proto-fuzzerKostya Serebryany2017-08-122-0/+39
| | | | | | | | | | | | | | Summary: Add a Dockerfile for clang-proto-fuzzer Reviewers: morehouse, vitalybuka Reviewed By: morehouse Subscribers: hintonda, cfe-commits Differential Revision: https://reviews.llvm.org/D36635 llvm-svn: 310774
* [clang-fuzzer] Resolve proto dependenciesVitaly Buka2017-08-091-1/+4
| | | | llvm-svn: 310441
* Integrate Kostya's clang-proto-fuzzer with LLVM.Matt Morehouse2017-08-0812-43/+503
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The clang-proto-fuzzer models a subset of C++ as a protobuf and uses libprotobuf-mutator to generate interesting mutations of C++ programs. Clang-proto-fuzzer has already found several bugs in Clang (e.g., https://bugs.llvm.org/show_bug.cgi?id=33747, https://bugs.llvm.org/show_bug.cgi?id=33749). As with clang-fuzzer, clang-proto-fuzzer requires the following cmake flags: - CMAKE_C_COMPILER=clang - CMAKE_CXX_COMPILER=clang++ - LLVM_USE_SANITIZE_COVERAGE=YES // needed for libFuzzer - LLVM_USE_SANITIZER=Address // needed for libFuzzer In addition, clang-proto-fuzzer requires: - CLANG_ENABLE_PROTO_FUZZER=ON clang-proto-fuzzer also requires the following dependencies: - binutils // needed for libprotobuf-mutator - liblzma-dev // needed for libprotobuf-mutator - libz-dev // needed for libprotobuf-mutator - docbook2x // needed for libprotobuf-mutator - Recent version of protobuf [3.3.0 is known to work] A working version of libprotobuf-mutator will automatically be downloaded and built as an external project. Implementation of clang-proto-fuzzer provided by Kostya Serebryany. https://bugs.llvm.org/show_bug.cgi?id=33829 Reviewers: kcc, vitalybuka, bogner Reviewed By: kcc, vitalybuka Subscribers: thakis, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D36324 llvm-svn: 310408
* This adds the argument --dump-ir to clang-import-test, which allows Sean Callanan2017-08-071-3/+11
| | | | | | | | | | | | | | | | | | | | | viewing of the final IR. This is useful for confirming that structure layout was correct. I've added two tests: - A test that checks that structs in top-level code are completed correctly during struct layout (they are) - A test that checks that structs defined in function bodies are cpmpleted correctly during struct layout (currently they are not, so this is XFAIL). The second test fails because LookupSameContext() (ExternalASTMerger.cpp) can't find the struct. This is an issue I intend to resolve separately. Differential Revision: https://reviews.llvm.org/D36429 llvm-svn: 310318
* [libclang] Determinize order of platform availability attrsReid Kleckner2017-08-041-1/+2
| | | | | | | | | | Previously this code was doing std::sort on IdentifierInfo pointers. Now it sorts alphabetically by platform name. This should de-flake clang/test/Index/availability.c, which was failing non-deterministically for me. llvm-svn: 310138
* [diagtool] Add ability to pass in the id and return the name for aDon Hinton2017-08-031-1/+17
| | | | | | | | particular diagnostic. Differential Revision: https://reviews.llvm.org/D36252 llvm-svn: 309955
* Update for llvm change.Rafael Espindola2017-08-021-1/+1
| | | | llvm-svn: 309885
* [CMake][Modules] libclang: Ignore _CINDEX_LIB_ and CLANG_TOOL_EXTRA_BUILD ↵NAKAMURA Takumi2017-07-311-0/+9
| | | | | | | | | | | | | for -fmodules. CLANG_TOOL_EXTRA_BUILD doesn't affect headers. _CINDEX_LIB_ is defined when the target is SHARED. On Win32, it affects clang-c/Platform.h and it shouldn't be ignored. This is part of https://reviews.llvm.org/D35559 llvm-svn: 309557
* [clang-diff] Rename, NFCJohannes Altmanninger2017-07-271-2/+2
| | | | llvm-svn: 309276
* [OPENMP] Codegen for 'in_reduction' clause.Alexey Bataev2017-07-271-0/+2
| | | | | | | | | | | | | | | | | | Added codegen for task-based directive with in_reduction clause. ``` <body> ``` The next code is emitted: ``` void *td; ... td = call i8* @__kmpc_task_reduction_init(); ... <type> *priv = (<type> *)call i8* @__kmpc_task_reduction_get_th_data(i32 GTID, i8* td, i8* <orig>) ``` llvm-svn: 309270
* Update after LLVM change r309087George Rimar2017-07-261-1/+2
| | | | llvm-svn: 309088
* Fix a bot by linking clang-import-test against libclangDriverSean Callanan2017-07-251-0/+1
| | | | llvm-svn: 309018
* [ExternalASTMerger] Import Objective-C classesSean Callanan2017-07-251-12/+27
| | | | | | | | | | | | | This patch adds functionality and a test for importing Objective-C classes and their methods. It also adds a flag to clang-import-test to set the language used for parsing. This takes the same argument format as the -x option to the driver. Differential Revision: https://reviews.llvm.org/D35274 llvm-svn: 309014
* [OPENMP] Codegen for 'task_reduction' clause.Alexey Bataev2017-07-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added codegen for taskgroup directive with task_reduction clause. ``` <body> ``` The next code is emitted: ``` %struct.kmp_task_red_input_t red_init[n]; void *td; call void @__kmpc_taskgroup(%ident_t id, i32 gtid) ... red_init[i].shar = &<item>; red_init[i].size = sizeof(<item>); red_init[i].init = (void*)initializer_function; red_init[i].fini = (void*)destructor_function; red_init[i].comb = (void*)combiner_function; red_init[i].flags = flags; ... td = call i8* @__kmpc_task_reduction_init(i32 gtid, i32 n, i8* (void*)red_init); call void @__kmpc_end_taskgroup(%ident_t id, i32 gtid) void initializer_function(i8* priv) { *(<type>*)priv = <red_init>; ret void; } void destructor_function(i8* priv) { (<type>*)priv->~(); ret void; } void combiner_function(i8* inout, i8* in) { *(<type>*)inout = *(<type>*)inout <red_id> *(<type>*)in; ret void; } ``` llvm-svn: 308979
* [OPENMP] Initial support for 'in_reduction' clause.Alexey Bataev2017-07-211-0/+17
| | | | | | | Parsing/sema analysis for 'in_reduction' clause for task-based directives. llvm-svn: 308768
* [clang-diff] Add initial implementationAlex Lorenz2017-07-213-0/+124
| | | | | | | | | | | | | | This is the first commit for the "Clang-based C/C++ diff tool" GSoC project. ASTDiff is a new library that computes a structural AST diff between two ASTs using the gumtree algorithm. Clang-diff is a new Clang tool that will show the structural code changes between different ASTs. Patch by Johannes Altmanninger! Differential Revision: https://reviews.llvm.org/D34329 llvm-svn: 308731
* [scan-build-py] Patch to fix "-analyzer-config" optionPetr Hosek2017-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | I noticed that when I use "-analyze-config" option in scan-build-py, it behaves differently from original perl based scan-build. For example, command: $ scan-build -analyzer-config ipa=basic-inlining make Will work without any issues on perl version of scan-build. But on scan-build-py it will throw an error message "error reading 'ipa=basic-inlining'". After debugging, it turns out that the scan-build-py does not put "-analyzer-config" flag in front of the analyzer config flags (in this case is the "ipa=basic-inlining") in the final clang command line. This patch fixes this issue. Patch by Haowei Wu Differential Revision: https://reviews.llvm.org/D34489 llvm-svn: 308401
* [OPENMP] Initial support for 'task_reduction' clause.Alexey Bataev2017-07-181-0/+17
| | | | | | Parsing/sema analysis of the 'task_reduction' clause. llvm-svn: 308352
OpenPOWER on IntegriCloud