summaryrefslogtreecommitdiffstats
path: root/clang/utils
Commit message (Collapse)AuthorAgeFilesLines
...
* [analyzer] [tests] Show the number of removed/added bug reportsGeorge Karpenkov2018-02-011-0/+9
| | | | | | Differential Revision: https://reviews.llvm.org/D42718 llvm-svn: 323941
* [analyzer] Use stable filenames in analyzer testing infrastructureGeorge Karpenkov2018-01-291-0/+1
| | | | | | | | Makes finding the right file in test results easier. Differential Revision: https://reviews.llvm.org/D42445 llvm-svn: 323697
* Unused diagnostics can occur in tblgen.Benjamin Kramer2018-01-251-1/+1
| | | | llvm-svn: 323435
* [NFC] fix trivial typos in commentsHiroshi Inoue2018-01-221-2/+2
| | | | | | "the the" -> "the" llvm-svn: 323078
* [AArch64] Add ARMv8.2-A FP16 scalar intrinsicsAbderrazek Zaafrani2018-01-193-1/+153
| | | | | | https://reviews.llvm.org/D41792 llvm-svn: 323006
* Make attribute instantiation instantiate all attributes, not just the first ofRichard Smith2018-01-041-2/+10
| | | | | | | | | | | | | | | | | | | | each kind. Attribute instantiation would previously default to instantiating each kind of attribute only once. This was overridden by a flag whose intended purpose was to permit attributes from a prior declaration to be inherited onto a new declaration even if that new declaration had its own copy of the attribute. This is the wrong behavior: when instantiating attributes from a template, we should always instantiate all the attributes that were written on that template. This patch renames the flag in the Attr class (and TableGen sources) to more clearly identify what it's actually for, and removes the usage of the flag from template instantiation. I also removed the flag from AlignedAttr, which was only added to work around the incorrect suppression of duplicate attribute instantiation. llvm-svn: 321834
* Introduce some infrastructure for adding C attributes with [[]] syntax.Aaron Ballman2018-01-031-0/+2
| | | | | | | | This patch adds support to the attribute tablegen for specifying a [[]] attribute is allowed in C mode. This patch also adds the annotate attribute to the list of double square bracket attributes we support in C mode. Eventually, I anticipate that this logic will be reversed (you have to opt out of allowing an attribute in C rather than opting in), but I want to see how the design plays out as more attributes are considered. llvm-svn: 321763
* Avoid int to string conversion in Twine or raw_ostream contexts.Benjamin Kramer2017-12-281-3/+3
| | | | | | Some output changes from uppercase hex to lowercase hex, no other functionality change intended. llvm-svn: 321526
* [AARch64] Add ARMv8.2-A FP16 vector intrinsicsAbderrazek Zaafrani2017-12-211-1/+5
| | | | | | | | Putting back the code that was reverted few weeks ago. Differential Revision: https://reviews.llvm.org/D34161 llvm-svn: 321294
* Add support for ObjectFormat to TargetSpecificAttrErich Keane2017-12-201-40/+42
| | | | | | | | | | | | | | | | Looking through the code, I saw a FIXME on IFunc to switch it to a target specific attribute. In looking through it, i saw that the no-longer-appropriately-named TargetArch didn't support ObjectFormat checking. This patch changes the name of TargetArch to TargetSpecific (since it checks much more than just Arch), makes "Arch" optional, adds support for ObjectFormat, better documents the TargetSpecific type, and changes IFunc over to a TargetSpecificAttr. Differential Revision: https://reviews.llvm.org/D41303 llvm-svn: 321201
* Silence a bunch of implicit fallthrough warningsAdrian Prantl2017-12-191-3/+3
| | | | llvm-svn: 321115
* Determine the attribute subject for diagnostics based on declarative ↵Aaron Ballman2017-11-261-121/+57
| | | | | | | | | | information in DeclNodes.td. This greatly reduces the number of enumerated values used for more complex diagnostics; these are now only required when the "attribute only applies to" diagnostic needs to be generated manually as part of semantic processing. This also clarifies some terminology used by the diagnostic (methods -> Objective-C methods, fields -> non-static data members, etc). Many of the tests needed to be updated in multiple places for the diagnostic wording tweaks. The first instance of the diagnostic for that attribute is fully specified and subsequent instances cut off the complete list (to make it easier if additional subjects are added in the future for the attribute). llvm-svn: 319002
* Move the clang-tblgen project into the Clang tablegenning folder on IDEs ↵Aaron Ballman2017-11-041-0/+1
| | | | | | like Visual Studio rather than leave it in the root directory. NFC. llvm-svn: 317418
* [analyzer] [tests] Remove empty folders in reference results, do not store ↵George Karpenkov2017-10-302-17/+12
| | | | | | | | | | | diffs.txt Storing diffs.txt is now redundant, as we simply dump the CmpRuns output to stdout (it is saved in CI and tends to be small). Not generating those files enables us to remove empty folders, which confuse git, as it would not add them with reference results. llvm-svn: 316948
* [Analyzer] [Tests] Fixing typo from the previous commit.George Karpenkov2017-10-271-1/+1
| | | | | | Can not open a non-existent file with r+. llvm-svn: 316808
* [Analyzer] [Tests] Dump the output of scan-build to stdout on failure.George Karpenkov2017-10-271-5/+6
| | | | | | Eliminates extra lookup step during debugging. llvm-svn: 316806
* New lldb python module for managing diagnostic breakpointsDon Hinton2017-10-271-0/+192
| | | | | | | | | | | Summary: Can be used to set breakpoints for either the diagnostics actually emitted for the current compilation, a particular DiagID, or all DiagIDs for a particular warning. Differential Revision: https://reviews.llvm.org/D36347 llvm-svn: 316773
* [Analyzer] [Tests] Write analyzers crashes to stdout, and not to a separate fileGeorge Karpenkov2017-10-261-20/+12
| | | | | | | With this change it would be sufficient to look at CI console to see the failure. llvm-svn: 316687
* Add a new attribute definition spelling, Clang<"attr">, that expands to two ↵Aaron Ballman2017-10-261-6/+10
| | | | | | | | | | attribute spellings: GNU<"attr"> and CXX11<"clang", "attr">. This is similar to how the GCC spelling works and is intended to be used for attributes introduced for Clang. Changes all existing attributes that currently use GNU<"attr"> and CXX11<"clang", "attr> spellings to instead use the Clang<"attr"> spelling. No additional tests are necessary because the existing tests already use both spellings for the attributes converted to the new spelling. No functional changes are expected. llvm-svn: 316658
* [Analyzer] [Tests] Consistently use exit codes. Use code=42 to signify ↵George Karpenkov2017-10-262-10/+13
| | | | | | different results llvm-svn: 316632
* [Analyzer] [Tests] Do not discard output from CmpRuns.py when running ↵George Karpenkov2017-10-252-15/+1
| | | | | | | | | | integration tests Contrary to the deleted comment, in most cases CmpRuns.py produces a fairly small amount of output, which is useful to see straight away to see what has changed when executing the integration tests. llvm-svn: 316618
* [Analyzer] [Tests] Minor refactor of testing infrastructure:George Karpenkov2017-10-242-115/+122
| | | | | | | Move utilities functions into a separate file to make comprehension easier. llvm-svn: 316535
* [Analyzer] [Tests] Remove temporary fields from generated reference results.George Karpenkov2017-10-241-0/+8
| | | | | | | Pointer to HTML diagnostics is removed (as it is not stored) as well as the version (as it would be available from the commit message). llvm-svn: 316534
* [Analyzer] Fix bug in testing scripts, which always marked result as failure.George Karpenkov2017-10-241-0/+1
| | | | llvm-svn: 316522
* Silence -Wimplicit-fallthrough warnings with the generated code; NFC.Aaron Ballman2017-10-181-1/+1
| | | | llvm-svn: 316075
* Fix usage in TableGen of getValueAsStringErich Keane2017-10-161-28/+27
| | | | | | | | | | | | | | | Record::getValueAsString returns a stringref to an interned string (apparently had been changed since most of tablegen was written). In this patch, I audited the usage of getValueAsString to find places where we can trivially stop storing 'std::string' and instead keep the stringref. There was one instance where an unnecessary 'stringstream' was being used, so that has been removed as well to unblock the stringref replacing string fix. Differential Revision: https://reviews.llvm.org/D38979 llvm-svn: 315956
* Replace usage of std::stringstream with raw_string_ostreamErich Keane2017-10-161-2/+3
| | | | | | | | Typically we don't use the stringstream, so instead use raw_string_stream. Additionally, the dependent function changed to use raw_ostream. llvm-svn: 315950
* Sort Attributes by "HeaderName" Erich Keane2017-10-161-20/+36
| | | | | | | | | | | | | | Attributes in the docs were previously sorted (apparently) by the attribute name, so AnyX86Interrupt ended up being the first one, rather than in a meaningful place. This resulted in the 4 'interrupt' titled sections being all in different places. This replaces it with a naive alphabetical sort (case sensitive, underscore and special characters first, etc). Differential Revision: https://reviews.llvm.org/D38969 llvm-svn: 315931
* Add -f[no-]double-square-bracket-attributes as new driver options to control ↵Aaron Ballman2017-10-151-28/+50
| | | | | | use of [[]] attributes in all language modes. This is the initial implementation of WG14 N2165, which is a proposal to add [[]] attributes to C2x, but also allows you to enable these attributes in C++98, or disable them in C++11 or later. llvm-svn: 315856
* [clang] Enable clang build with LLVM_BUILD_INSTRUMENTED without setting ↵Alexander Shaposhnikov2017-10-131-6/+6
| | | | | | | | | | | | | | | | | | LLVM_PROFTDATA At the moment if LLVM_BUILD_INSTRUMENTED is set to True one has to set LLVM_PROFTDATA even if it's not really used (because of message(FATAL_ERROR ...)). Building the instrumented version of Clang can be useful even if one doesn't plan to build the target generate-profdata (currently that target would only compile utils/perf-training/cxx/hello_world.cpp). For example, one can run the instrumented version of Clang via a separate build system against a different codebase, collect/analyze the profiles and merge them by llvm-profdata later. Differential revision: https://reviews.llvm.org/D38859 llvm-svn: 315665
* [Analyzer] Remove dead code from testing scriptsGeorge Karpenkov2017-10-111-53/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D38488 llvm-svn: 315489
* [Analyzer Tests] Run static analyzer integration tests until the end,George Karpenkov2017-10-051-8/+20
| | | | | | | | Do not stop at the first failure. Differential Revision: https://reviews.llvm.org/D38589 llvm-svn: 314992
* [Analyzer Tests] Fix misc bugs in analyzer reference results updater.George Karpenkov2017-10-051-4/+16
| | | | llvm-svn: 314960
* [Analyzer] Make testing scripts flake8 compliantGeorge Karpenkov2017-10-026-299/+397
| | | | | | Differential Review: https://reviews.llvm.org/D38213 llvm-svn: 314692
* [Analyzer] Add nullability to the list of tested checkers in SATestBuildGeorge Karpenkov2017-09-301-1/+12
| | | | | | Differential Revision: https://reviews.llvm.org/D38162 llvm-svn: 314572
* [Analyzer] Fix minor errors in python scripts.George Karpenkov2017-09-222-6/+5
| | | | llvm-svn: 314042
* [Analyzer] Static analyzer script for updating reference resultsGeorge Karpenkov2017-09-221-0/+64
| | | | | | | | The script updates reference results from the previous run, and stages them. Differential Revision: https://reviews.llvm.org/D38157 llvm-svn: 313950
* [Analyzer] Refactor analyzer testing scripts.George Karpenkov2017-09-223-88/+75
| | | | | | | | | | | | | - Exporting needed function for future reuse. - Idiomatic python: using with `file as f` instead of `try/finally`. - Fixing some indentation issues. - No need to reinvent python `multiprocessing.getCPUCount()` - Removing a function parameter which is always the same under all invocations. - Adding some docstrings. Differential Revision: https://reviews.llvm.org/D38156 llvm-svn: 313949
* [Analyzer] Use CC environment variable to select analyzer path in SATestBuild.George Karpenkov2017-09-211-1/+4
| | | | | | | | | This change is required to easily test the given checkout of the analyzer, rather than the one bundled with a system compiler. Differential Revision: https://reviews.llvm.org/D38155 llvm-svn: 313927
* [Analyzer] Add simple help to SATestAdd.pyGeorge Karpenkov2017-09-211-5/+6
| | | | | | Differential Revision: https://reviews.llvm.org/D38003 llvm-svn: 313924
* [Analyzer] Remove dead code from CmpRuns.py.George Karpenkov2017-09-211-24/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D38003 llvm-svn: 313923
* Add '\n' in ClangDataCollectorsEmitterKonstantin Zhuravlyov2017-09-081-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D37599 llvm-svn: 312795
* [AST] Add TableGen for StmtDataCollectorsJohannes Altmanninger2017-09-064-0/+27
| | | | | | | | | | | | | | Summary: This adds an option "-gen-clang-data-collectors" to the Clang TableGen that is used to generate StmtDataCollectors.inc. Reviewers: arphaman, teemperor! Subscribers: mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D37383 llvm-svn: 312634
* Do not look through pack expansions when looking for unexpanded parameter packs.Richard Smith2017-08-151-0/+21
| | | | | | | Fixes a selection of rejects-valids when pack-expanding a lambda that itself contains a pack expansion. llvm-svn: 310972
* [Bash-autocompletion] Show HelpText with possible flagsYuka Takahashi2017-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 309113
* [Bash-completion] Fixed a bug that file doesn't autocompleted after =Yuka Takahashi2017-07-261-3/+7
| | | | | | | | | | 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 llvm-svn: 309112
* [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 llvm-svn: 308091
* [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 llvm-svn: 307479
* [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 llvm-svn: 307478
* 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. llvm-svn: 307277
OpenPOWER on IntegriCloud