summaryrefslogtreecommitdiffstats
path: root/utils
Commit message (Collapse)AuthorAgeFilesLines
* Merging r309113:Hans Wennborg2017-07-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r309113 | yamaguchi | 2017-07-26 06:36:58 -0700 (Wed, 26 Jul 2017) | 19 lines [Bash-autocompletion] Show HelpText with possible flags Summary: `clang --autocomplete=-std` will show ``` -std: Language standard to compile for -std= Language standard to compile for -stdlib= C++ standard library to use ``` after this change. However, showing HelpText with completion in bash seems super tricky, so this feature will be used in other shells (fish, zsh...). Reviewers: v.g.vassilev, teemperor, ruiu Subscribers: cfe-commits, hiraditya Differential Revision: https://reviews.llvm.org/D35759 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_50@309438 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r309112:Hans Wennborg2017-07-281-3/+7
| | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r309112 | yamaguchi | 2017-07-26 06:30:36 -0700 (Wed, 26 Jul 2017) | 7 lines [Bash-completion] Fixed a bug that file doesn't autocompleted after = Summary: File path wasn't autocompleted after `-fmodule-cache-path=[tab]`, so fixed this bug by checking if $flags contains only a newline or not. Differential Revision: https://reviews.llvm.org/D35763 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_50@309435 91177308-0d34-0410-b5e6-96231b3b80d8
* [Bash-autocompletion] Fixed a bug on bashYuka Takahashi2017-07-151-4/+7
| | | | | | | | Summary: Maybe I mismerged when merging previous commits by hand. Differential Revision: https://reviews.llvm.org/D35448 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308091 91177308-0d34-0410-b5e6-96231b3b80d8
* [Bash-autocompletion] Auto complete cc1 options if -cc1 is specifiedYuka Takahashi2017-07-081-6/+10
| | | | | | | | | | | | | | Summary: We don't want to autocomplete flags whose Flags class has `NoDriverOption` when argv[1] is not `-cc1`. Another idea for this implementation is to make --autocomplete a cc1 option and handle it in clang Frontend, by porting --autocomplete handler from Driver to Frontend, so that we can handle Driver options and CC1 options in unified manner. Differential Revision: https://reviews.llvm.org/D34770 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307479 91177308-0d34-0410-b5e6-96231b3b80d8
* [Bash-autocompletion] Fix a bug that -foo=bar doesn't handled properlyYuka Takahashi2017-07-081-0/+6
| | | | | | | | Summary: Fixed a bug that -foo=bar wasn't handled properly on old version of bash. Differential Revision: https://reviews.llvm.org/D34927 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307478 91177308-0d34-0410-b5e6-96231b3b80d8
* This reverts r305820 (ARMv.2-A FP16 vector intrinsics) because it showsSjoerd Meijer2017-07-061-5/+1
| | | | | | | | | problems in testing, see comments in D34161 for some more details. A fix is in progres in D35011, but a revert seems better now as the fix will probably take some more time to land. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307277 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix one more reference to lit.util.capture()Michael Zolotukhin2017-07-052-2/+4
| | | | | | The capture method was removed in r306643. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307201 91177308-0d34-0410-b5e6-96231b3b80d8
* [Bash-autocompletion] Add support for older bash version.Yuka Takahashi2017-07-011-7/+25
| | | | | | | | | | | | | | Summary: OS X seems to use older bash version which doesn't suport _init_completion and compopt, so add support for this. Reviewers: ruiu, v.g.vassilev, teemperor Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D34924 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@306962 91177308-0d34-0410-b5e6-96231b3b80d8
* [Bash-completion] Fixed a bug that ~ doesn't expanded to $HOMEYuka Takahashi2017-07-011-1/+3
| | | | | | | | Summary: `~/build/bin/clang -f[tab]` was executed without ~ expanded to $HOME, so changed this by expanding ~ to path using eval. Differential Revision: https://reviews.llvm.org/D34925 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@306957 91177308-0d34-0410-b5e6-96231b3b80d8
* [Bash-autocompletion] Invoke clang where user calledYuka Takahashi2017-06-281-1/+1
| | | | | | | | | Summary: When user build clang and used completion Eg. `build/bin/clang -fno[tab]`, we want to invoke `build/bin/clang --autocomplete=-fno`, rather than `clang --autocomplete=-fno`. Differential Revision: https://reviews.llvm.org/D34761 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@306559 91177308-0d34-0410-b5e6-96231b3b80d8
* [Bash-autocompletion] Check clang version in BashYuka Takahashi2017-06-281-2/+9
| | | | | | | | | | | | | | Summary: Add check if user's clang version supports --autocomplete or not. If not, we just autocomplete files. Reviewers: ruiu, v.g.vassilev, teemperor Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D34607 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@306555 91177308-0d34-0410-b5e6-96231b3b80d8
* [bash-autocompletion] Delete space after flags which has '=' prefixYuka Takahashi2017-06-261-4/+5
| | | | | | | | | | Summary: This is patch for bash completion for clang project. We don't need space when completing options like "-stdlib=". Differential Revision: https://reviews.llvm.org/D34594 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@306258 91177308-0d34-0410-b5e6-96231b3b80d8
* [AArch64] ADD ARMv.2-A FP16 vector intrinsicsAbderrazek Zaafrani2017-06-201-1/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D34161 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305820 91177308-0d34-0410-b5e6-96231b3b80d8
* [GSoC] Flag value completion for clangYuka Takahashi2017-06-201-3/+27
| | | | | | | | | | | | This is patch for GSoC project, bash-completion for clang. To use this on bash, please run `source clang/utils/bash-autocomplete.sh`. bash-autocomplete.sh is code for bash-completion. In this patch, Options.td was mainly changed in order to add value class in Options.inc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305805 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[AArch64] Add ARMv8.2-A FP16 vefctor intrinsics"Vedant Kumar2017-06-021-5/+1
| | | | | | | | | | | | This reverts commit r304493. It breaks all the Darwin bots: http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental_check/37168 Failure: Failing Tests (2): Clang :: CodeGen/aarch64-v8.2a-neon-intrinsics.c Clang :: CodeGen/arm_neon_intrinsics.c git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304509 91177308-0d34-0410-b5e6-96231b3b80d8
* [AArch64] Add ARMv8.2-A FP16 vefctor intrinsicsAbderrazek Zaafrani2017-06-011-1/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304493 91177308-0d34-0410-b5e6-96231b3b80d8
* [TableGen] Clang changes to support Record::getValueAsString and ↵Craig Topper2017-05-314-31/+39
| | | | | | | | | | getValueAsListOfStrings returning StringRef instead of std::string This is the clang version of D33710. Differential Revision: https://reviews.llvm.org/D33711 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304326 91177308-0d34-0410-b5e6-96231b3b80d8
* Enhance the 'diagnose_if' attribute so that we can apply it for ObjC methods ↵Argyrios Kyrtzidis2017-05-241-1/+5
| | | | | | | | and properties as well This is an initial commit to allow using it with constant expressions, a follow-up commit will enable full support for it in ObjC methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@303712 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespaceYuka Takahashi2017-05-231-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@303672 91177308-0d34-0410-b5e6-96231b3b80d8
* [GSoC] Shell autocompletion for clangYuka Takahashi2017-05-231-0/+14
| | | | | | | | | | | | | | | | | Summary: This is a first patch for GSoC project, bash-completion for clang. To use this on bash, please run `source clang/utils/bash-autocomplete.sh`. bash-autocomplete.sh is code for bash-completion. Simple flag completion and path completion is available in this patch. Reviewers: teemperor, v.g.vassilev, ruiu, Bigcheese, efriedma Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D33237 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@303670 91177308-0d34-0410-b5e6-96231b3b80d8
* utils: Silence -Wpedantic warningSaleem Abdulrasool2017-05-011-2/+2
| | | | | | | | | | llvm/tools/clang/utils/TableGen/ClangAttrEmitter.cpp:1673:67: warning: default argument specified for lambda parameter [-Wpedantic] const Record *Constraint = nullptr) { ^~~~~~~ Found by gcc 5.4.0. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301783 91177308-0d34-0410-b5e6-96231b3b80d8
* Add #pragma clang attribute support to the external_source_symbol attributeAlex Lorenz2017-04-191-24/+113
| | | | | | | | | | | | | | | | | | | | Prior to this commit the external_source_symbol attribute wasn't supported by #pragma clang attribute for the following two reasons: - The Named attribute subject hasn't been supported by TableGen. - There was no way to specify a subject match rule for #pragma clang attribute that could operate on a set of attribute subjects (e.g. the ones that derive from NamedDecl). This commit fixes the two issues and thus adds external_source_symbol support to #pragma clang attribute. rdar://31169028 Differential Revision: https://reviews.llvm.org/D32176 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300712 91177308-0d34-0410-b5e6-96231b3b80d8
* Add #pragma clang attributeAlex Lorenz2017-04-183-12/+470
| | | | | | | | | | | | | | | | | | This is a recommit of r300539 that was reverted in r300543 due to test failures. The original commit message is displayed below: The new '#pragma clang attribute' directive can be used to apply attributes to multiple declarations. An attribute must satisfy the following conditions to be supported by the pragma: - It must have a subject list that's defined in the TableGen file. - It must be documented. - It must not be late parsed. - It must have a GNU/C++11 spelling. Differential Revision: https://reviews.llvm.org/D30009 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300556 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r300539 - Add #pragma clang attributeAlex Lorenz2017-04-183-470/+12
| | | | | | | | Some tests fail on the Windows buildbots. I will have to investigate more. This commit reverts r300539, r300540 and r300542. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300543 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix one more 'not all control paths return a value' MSVC warningAlex Lorenz2017-04-181-1/+1
| | | | | | | The warning was caused by r300539. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300542 91177308-0d34-0410-b5e6-96231b3b80d8
* [TableGen] Fix MSVC warning that occurs in TableGen generated functionAlex Lorenz2017-04-181-1/+3
| | | | | | | This should fix the Windows buildbot failure that happened after r300539. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300540 91177308-0d34-0410-b5e6-96231b3b80d8
* Add #pragma clang attributeAlex Lorenz2017-04-183-12/+468
| | | | | | | | | | | | | | | The new '#pragma clang attribute' directive can be used to apply attributes to multiple declarations. An attribute must satisfy the following conditions to be supported by the pragma: - It must have a subject list that's defined in the TableGen file. - It must be documented. - It must not be late parsed. - It must have a GNU/C++11 spelling. Differential Revision: https://reviews.llvm.org/D30009 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300539 91177308-0d34-0410-b5e6-96231b3b80d8
* [NFC, Scoped Enum] Convert Sema::ExpressionEvaluationContext into a scoped EnumFaisal Vali2017-04-011-2/+2
| | | | | | | | | - also replace direct equality checks against the ConstantEvaluated enumerator with isConstantEvaluted(), in anticipation of adding finer granularity to the various ConstantEvaluated contexts and reinstating certain restrictions on where lambda expressions can occur in C++17. - update the clang tablegen backend that uses these Enumerators, and add the relevant scope where needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299316 91177308-0d34-0410-b5e6-96231b3b80d8
* Correct class-template deprecation behavior-REDUXErich Keane2017-03-231-16/+28
| | | | | | | | | | | | | | | | | | | Correct class-template deprecation behavior Based on the comment in the test, and my reading of the standard, a deprecated warning should be issued in the following case: template<typename T> [[deprecated]] class Foo{}; Foo<int> f; This was not the case, because the ClassTemplateSpecializationDecl creation did not also copy the deprecated attribute. Note: I did NOT audit the complete set of attributes to see WHICH ones should be copied, so instead I simply copy ONLY the deprecated attribute. Previous DiffRev: https://reviews.llvm.org/D27486, was reverted. This patch fixes the issues brought up here by the reverter: https://reviews.llvm.org/rL298410 Differential Revision: https://reviews.llvm.org/D31245 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298634 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Correct class-template deprecation behavior"Martin Bohme2017-03-221-28/+16
| | | | | | | This reverts commit r298410 (which produces incorrect warnings, see comments on https://reviews.llvm.org/rL298410). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298504 91177308-0d34-0410-b5e6-96231b3b80d8
* Correct class-template deprecation behaviorErich Keane2017-03-211-16/+28
| | | | | | | | | | | | | | Based on the comment in the test, and my reading of the standard, a deprecated warning should be issued in the following case: template<typename T> [[deprecated]] class Foo{}; Foo<int> f; This was not the case, because the ClassTemplateSpecializationDecl creation did not also copy the deprecated attribute. Note: I did NOT audit the complete set of attributes to see WHICH ones should be copied, so instead I simply copy ONLY the deprecated attribute. Differential Revision: https://reviews.llvm.org/D27486 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298410 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve workaround for Sphinx's lack of support for command line options ↵Richard Smith2017-01-271-14/+47
| | | | | | containing '+', '.' etc. to be more stable as the set of options changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@293252 91177308-0d34-0410-b5e6-96231b3b80d8
* [docs] Add TableGen-based generator for command line argument documentation,Richard Smith2017-01-244-2/+368
| | | | | | | | and generate documentation for all (non-hidden) options supported by the 'clang' driver. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@292968 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch TableGen to emit calls to ASTRecordReader for AttrPCHRead.David L. Jones2017-01-241-19/+19
| | | | | | | | | | | | | | | Summary: This patch changes TableGen-generated code in AttrPCHRead to call functions on ASTRecordReader, instead of passing separate parameters to ASTReader. This is a follow-up to r290217. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D28007 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@292868 91177308-0d34-0410-b5e6-96231b3b80d8
* [TableGen] Only normalize the spelling of GNU-style attributes.Justin Lebar2017-01-051-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When Sema looks up an attribute name, it strips off leading and trailing "__" if the attribute is GNU-style. That is, __attribute__((foo)) and __attribute__((__foo__)) are equivalent. This is only true for GNU-style attributes. In particular, __declspec(__foo__) is not equivalent to __declspec(foo), and Sema respects this difference. This patch fixes TableGen to match Sema's behavior. The spelling 'GNU<"__foo__">' should be normalized to 'GNU<"foo">', but 'Declspec<"__foo__">' should not be changed. This is necessary to make CUDA compilation work on Windows, because e.g. the __device__ attribute is spelled __declspec(__device__). Attr.td does not contain any Declspec spellings that start or end with "__", so this change should not affect any other attributes. Reviewers: rnk Subscribers: cfe-commits, tra Differential Revision: https://reviews.llvm.org/D28318 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291129 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang] Update lit config in utils/perf-trainingAlexander Shaposhnikov2017-01-042-4/+3
| | | | | | | | | | | | | This diff replaces --driver-mode=cpp in utils/perf-training/order-files.lit.cfg and utils/perf-training/lit.cfg with --driver-mode=g++. clang --driver-mode=cpp will call the preprocessor and will not trigger compilation. Differential revision: https://reviews.llvm.org/D28269 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290936 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang] Fix clean build of generate-order-fileAlexander Shaposhnikov2016-12-311-1/+5
| | | | | | | | | | | | | | This diff fixes the clean build of the target generate-order-file. In llvm/tools/clang/CMakeLists.txt add_subdirectory(utils/perf-training) should go after the block where the value of the variable CLANG_ORDER_FILE is set - otherwise (tested with cmake's version 3.6.2) the arguments of perf-helper.py gen-order-file will be ill-formed (CLANG_ORDER_FILE will be empty). Differential revision: https://reviews.llvm.org/D28153 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290781 91177308-0d34-0410-b5e6-96231b3b80d8
* Adapt to llvm/TableGen DagInit changes.Matthias Braun2016-12-051-15/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288645 91177308-0d34-0410-b5e6-96231b3b80d8
* TableGen: Adapt to llvm r288612Matthias Braun2016-12-042-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288614 91177308-0d34-0410-b5e6-96231b3b80d8
* [TableGen] Ignore fake args for parsing-related arg counts.George Burgess IV2016-12-011-0/+4
| | | | | | | | | | | | | | | | | | | We should complain about the following: ``` void foo() __attribute__((unavailable("a", "b"))); ``` Instead, we currently just ignore "b". (...We also end up ignoring "a", because we assume elsewhere that this attribute can only have 1 or 0 args.) This happens because `unavailable` has a fake enum arg, and `AttributeList::{getMinArgs,getMaxArgs}` include fake args in their counts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288388 91177308-0d34-0410-b5e6-96231b3b80d8
* [TableGen] Minor clean-ups. NFC.George Burgess IV2016-12-011-52/+42
| | | | | | | | | | Primarily: try to use DenseSet<StringRef> instead of std::set<std::string>, and use pretty range algos where we can. Small sizes were arbitrarily chosen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288297 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some Clang-tidy and Include What You Use warnings; other minor fixes (NFC).Eugene Zelenko2016-11-291-19/+44
| | | | | | | This preparation to remove SetVector.h dependency on SmallSet.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288213 91177308-0d34-0410-b5e6-96231b3b80d8
* Use noexcept instead of LLVM_NOEXCEPT now that all compilers support itReid Kleckner2016-10-191-3/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284667 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete clang-completion-mode.el.Manuel Klimek2016-10-111-248/+0
| | | | | | | | | | | | It has been unmaintained for a while (last change was more than four years ago), and it appears not widely used. By now there are multiple well-maintained alternatives (emacs-ycmd, atuo-complete-clang), and if users try to make this work they'll likely have a bad user experience. Reasoning and problems pointed out by Philipp Stephani. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@283864 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn cl::values() (for enum) from a vararg function to using C++ variadic ↵Mehdi Amini2016-10-081-2/+1
| | | | | | | | | | | | | | | template The core of the change is supposed to be NFC, however it also fixes what I believe was an undefined behavior when calling: va_start(ValueArgs, Desc); with Desc being a StringRef. Differential Revision: https://reviews.llvm.org/D25342 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@283671 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix warnings in clang-completion-mode.el.Manuel Klimek2016-09-281-7/+6
| | | | | | | | | - Use defvar to declare variables - Don't use delete-backward-char, which is for interactive use only Patch by Philipp Stephani git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282573 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] SATestBuild.py: Treat '#' as comment in projectMap.csvDevin Coughlin2016-09-191-0/+8
| | | | | | | | | | Treat lines in projectMap.csv that start with '#' as comments. This enables a workflow where projects can be temporarily disabled with a comment describing when they should be turned back on. Differential Revision: https://reviews.llvm.org/D24709 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281880 91177308-0d34-0410-b5e6-96231b3b80d8
* [docs] Order diagnostic cross-references alphabetically rather than based onRichard Smith2016-09-141-0/+1
| | | | | | | order in the .td file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281434 91177308-0d34-0410-b5e6-96231b3b80d8
* Update DiagnosticsReference and fix emitter to emit -Wpedantic diagnostics ↵Richard Smith2016-09-141-3/+12
| | | | | | and groups in a deterministic order. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281433 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a FIXME about MSVC 2013 in the diagnostic doc generation codeReid Kleckner2016-09-131-5/+7
| | | | | | Ultimately it boiled down to adding a move constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281408 91177308-0d34-0410-b5e6-96231b3b80d8