Jordan Rose
dc191a184f
[analyzer] SATestBuild should execute SVN updates even if Verbose is off.
...
Also, re-use glob results when looking for failure logs.
llvm-svn: 157817
2012-06-01 16:24:43 +00:00
Jordan Rose
01ac57244c
[analyzer] Fix SATestAdd to work with SATestBuild.
...
Also, eliminate global 'IsReferenceBuild' in SATestBuild. It doesn't get
passed around that much.
llvm-svn: 157816
2012-06-01 16:24:38 +00:00
Aaron Ballman
f4f486f732
Updating the visualizers to include more datatypes. Patch thanks to Jay Blanchard.
...
llvm-svn: 157763
2012-05-31 19:27:30 +00:00
Jim Grosbach
6acd46f5e9
TableGen: Remove extraneous '\' at EOL in generated tests.
...
llvm-svn: 157700
2012-05-30 18:18:29 +00:00
Ted Kremenek
f5958eb2b4
Fix typo.
...
llvm-svn: 157229
2012-05-22 00:54:40 +00:00
Ted Kremenek
c53ed2e158
Use Perl prototypes instead of shift.
...
llvm-svn: 157228
2012-05-22 00:52:49 +00:00
Ted Kremenek
2fe1ed3e0d
Add basic delta-debugging script used for reducing analyzer crasher test cases.
...
llvm-svn: 157219
2012-05-21 23:29:01 +00:00
David Blaikie
1f05227a3d
SmallString Visual Studio visualizer by Will Wilson.
...
llvm-svn: 156959
2012-05-16 22:28:47 +00:00
Rafael Espindola
7f90b7d4c2
Fix our handling of visibility in explicit template instantiations.
...
* Don't copy the visibility attribute during instantiations. We have to be able
to distinguish
struct HIDDEN foo {};
template<class T>
DEFAULT void bar() {}
template DEFAULT void bar<foo>();
from
struct HIDDEN foo {};
template<class T>
DEFAULT void bar() {}
template void bar<foo>();
* If an instantiation has an attribute, it takes precedence over an attribute
in the template.
* With instantiation attributes handled with the above logic, we can now
select the minimum visibility when looking at template arguments.
llvm-svn: 156821
2012-05-15 14:09:55 +00:00
Douglas Gregor
87a170c1e6
Teach the parser to deal with multiple spellings for the same
...
attribute, rather than requiring multiple cases in consumers of this
information.
llvm-svn: 156666
2012-05-11 23:37:49 +00:00
Jim Grosbach
6f855e3024
ARM: Support marking intrinsic definitions as 'unavailable'
...
llvm-svn: 156490
2012-05-09 18:17:30 +00:00
Richard Smith
ce52ca178d
Remove DiagGroups from notes, and add a TableGen assertion to catch them.
...
llvm-svn: 156192
2012-05-04 19:05:50 +00:00
Douglas Gregor
377f99bc68
Replace the StringSwitch in AttributeList::getKind() with a
...
TableGen-generated StringMatcher, for a 1.2% speedup in -fparse-only
time in <rdar://problem/11004361>. Thanks to Benjamin for pointing me
at StringMatcher!
llvm-svn: 156003
2012-05-02 17:33:51 +00:00
Douglas Gregor
19fbb8fa81
Introduce the notion of 'ignored' attributes, so that all attributes
...
we accept are not modeled somehow via Attr.td.
llvm-svn: 155998
2012-05-02 16:18:45 +00:00
Douglas Gregor
b2daf8416e
Introduce the notion of an attribute that has no direct representation
...
as an AST node, and fold a number of such attributes into Attr.td.
llvm-svn: 155995
2012-05-02 15:56:52 +00:00
Douglas Gregor
0191bf8655
Revert my optimization to AttributeList::getKind() in r155987;
...
Benjamin has suggested a better approach.
llvm-svn: 155989
2012-05-02 14:50:50 +00:00
Douglas Gregor
adfe5afe38
Replace the StringSwitch in AttributeList::getKind(const
...
IdentifierInfo *) with a static StringMap, improving -fsyntax-only
performance by 1% for the example in <rdar://problem/11004361>.
llvm-svn: 155987
2012-05-02 14:24:30 +00:00
Gabor Greif
ec1f7e872c
Add a FIXME for uncomplete comment
...
fix a typo
add punctuation
llvm-svn: 155443
2012-04-24 15:42:03 +00:00
David Blaikie
2e3380308e
Add SmallVectorImpl Visual Studio visualizer. Patch by Nikola Smiljanic.
...
llvm-svn: 155140
2012-04-19 17:26:49 +00:00
Eric Christopher
aefeaa9873
Remove the vestiges of the C backend.
...
llvm-svn: 153308
2012-03-23 05:51:52 +00:00
Aaron Ballman
fa432f30d4
Adding namespace qualifiers to the visualizers and improving their behavior.
...
Patch thanks to Nikola Smiljanic
llvm-svn: 152514
2012-03-10 22:28:45 +00:00
Argyrios Kyrtzidis
8b0f3e0525
[utils/FuzzTest] Add '--stop-on-fail' to stop the script on the first failure
...
without reverting the changes.
llvm-svn: 152333
2012-03-08 20:29:39 +00:00
Argyrios Kyrtzidis
941d092933
[utils/FuzzTest] The help message says that if you don't specify --max-tests
...
"the script will run forever continually picking new tests to run", make it so.
llvm-svn: 152327
2012-03-08 20:11:06 +00:00
Argyrios Kyrtzidis
05d2212db3
[utils/FuzzTest] For --filelist the option type is string, not integer.
...
llvm-svn: 152324
2012-03-08 18:56:59 +00:00
Daniel Dunbar
1c66a0e1c0
Spelling.
...
llvm-svn: 152281
2012-03-08 01:54:33 +00:00
Michael Han
4a04517329
Refactor Clang sema attribute handling.
...
This submission improves Clang sema handling by using Clang tablegen
to generate common boilerplate code. As a start, it implements AttributeList
enumerator generation and case statements for AttributeList::getKind.
A new field "SemaHandler" is introduced in Attr.td and by default set to 1
as most of attributes in Attr.td have semantic checking in Sema. For a small
number of attributes that don't appear in Sema, the value is set to 0.
Also there are a small number of attributes that only appear in Sema but not
in Attr.td. Currently these attributes are still hardcoded in Sema AttributeList.
Reviewed by Delesley Hutchins.
llvm-svn: 152169
2012-03-07 00:12:16 +00:00
Argyrios Kyrtzidis
87acf19a5c
[tablegen] Make sure that the code that is determining the order of warning groups
...
is shared to avoid any "misalignment" if indices.
llvm-svn: 152074
2012-03-06 00:00:38 +00:00
Anna Zaks
6ecb6a6b7f
[analyzer] Testing: These checkers are not experimental anymore.
...
llvm-svn: 150989
2012-02-20 21:10:40 +00:00
Benjamin Kramer
a8cafe23e3
Store the warning option corresponding to a diagnostics as an index into the option table instead of storing the name.
...
Another 8 bytes + relocation removed from every diagnostic on x86_64.
llvm-svn: 150615
2012-02-15 20:57:03 +00:00
Anna Zaks
a432feaf26
[analyzer] Add the Malloc checker to the list of tested checkers.
...
llvm-svn: 150535
2012-02-15 00:19:07 +00:00
Dmitri Gribenko
5dc3a6936d
Add a script that produces a list of all diagnostics that are defined in
...
Diagnostic*.td files but not used in sources.
llvm-svn: 150410
2012-02-13 20:21:52 +00:00
Dylan Noblesmith
f1a13f29f2
drop more llvm:: prefixes on SmallString<>
...
More cleanup after r149799.
llvm-svn: 150380
2012-02-13 12:32:26 +00:00
Daniel Dunbar
dc51baade4
Remove stray semi-colon.
...
llvm-svn: 150231
2012-02-10 06:00:29 +00:00
Benjamin Kramer
3edb3b4ac5
Kill the brief and full explanation fields from StaticDiagInfoRec. They were unused and wasted space for nothing.
...
- per PR11952.
llvm-svn: 150199
2012-02-09 19:38:26 +00:00
Aaron Ballman
abc7c5c5b6
Added MSVC visualizers for PointerIntPair and PointerUnions.
...
Patch by Nikola Smiljanic
llvm-svn: 149896
2012-02-06 20:47:31 +00:00
Benjamin Kramer
bf8da9d706
Move instantiateTemplateAttribute into the sema namespace, make helpers static.
...
llvm-svn: 149864
2012-02-06 11:13:08 +00:00
Anna Zaks
4c1ef976a8
[analyzer] Testing: add automated reference results reset.
...
llvm-svn: 149682
2012-02-03 06:35:23 +00:00
Anna Zaks
97981bdeb0
[analyzer] Testing: add 2 new checkers to the buildbot script.
...
llvm-svn: 149514
2012-02-01 16:46:57 +00:00
Anna Zaks
b3d896d333
[analyzer] Add the HTML file to the SATest diagnostic diff.
...
(Uses the functionality which has been in CmpRuns long before.)
llvm-svn: 148868
2012-01-24 21:57:35 +00:00
Anna Zaks
895c312404
[analyzer] Testing: make diagnostic diffs more informative (add
...
diagnostic message).
llvm-svn: 148867
2012-01-24 21:57:32 +00:00
Anna Zaks
a08c6b7efc
[analyzer] Unbreak the static analyzer bot. Regression from r148558.
...
When we build a single source file, we call clang directly (not though scan-build).
llvm-svn: 148612
2012-01-21 01:11:35 +00:00
DeLesley Hutchins
30398dd410
Delayed template instantiation of late-parsed attributes.
...
llvm-svn: 148595
2012-01-20 22:50:54 +00:00
DeLesley Hutchins
ceec3063e2
Instantiate dependent attributes when instantiating templates.
...
llvm-svn: 148592
2012-01-20 22:37:06 +00:00
Anna Zaks
7a75cf32a2
[analyzer] Tweak the buildbot script to include the experimental taint checker and correct the checker enabling setting.
...
llvm-svn: 148558
2012-01-20 19:10:59 +00:00
David Blaikie
8a40f700e6
Remove unreachable code in Clang. (replace with llvm_unreachable where appropriate or when GCC requires it)
...
llvm-svn: 148292
2012-01-17 06:56:22 +00:00
David Blaikie
f47fa304a4
Remove unnecessary default cases in switches over enums.
...
This allows -Wswitch-enum to find switches that need updating when these enums are modified.
llvm-svn: 148281
2012-01-17 02:30:50 +00:00
Jakob Stoklund Olesen
6f2288b67c
CodeInit was replaced by StringInit.
...
llvm-svn: 148095
2012-01-13 04:57:47 +00:00
Anna Zaks
de1f7f8bfb
[analyzer] Testing infrastructure: Flush output after every print
...
statement.
llvm-svn: 147862
2012-01-10 18:10:25 +00:00
Benjamin Kramer
4fde7a8007
Remove unused include of VectorExtras.h.
...
llvm-svn: 147737
2012-01-07 19:41:22 +00:00
Anna Zaks
5acd9603da
[analyzer] Correct the error message in the testing infrastructure.
...
llvm-svn: 147568
2012-01-04 23:53:50 +00:00
Bob Wilson
bd646de67f
Relax type checking for a few Neon intrinsics. <rdar://problem/10538555>
...
Not long ago, I tightened up the type checking for pointer arguments of
Neon intrinsics to match the specifications provided by ARM. One consequence
was that it became impossible to access the unaligned versions of a few
Neon load/store operations. Since there are just a few of these intrinsics
where it makes a difference, I think it's better to relax the type checking
than to either introduce new non-standard unaligned intrinsics or to disallow
intrinsics for the unaligned operations.
llvm-svn: 146963
2011-12-20 06:16:48 +00:00
David Blaikie
68e081d606
Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch
...
llvm-svn: 146959
2011-12-20 02:48:34 +00:00
Douglas Gregor
49ccfaa938
Add support for pretty-printing attributes, from Richard Membarth!
...
llvm-svn: 145002
2011-11-19 19:22:57 +00:00
Bob Wilson
89d14247ff
Fix Neon builtin pointer argument checking for "sret" builtins.
...
The code for checking Neon builtin pointer argument types was assuming that
there would only be one pointer argument. But, for vld2-4 builtins, the first
argument is a special sret pointer where the result will be stored. So,
instead of scanning all the arguments to find a pointer, have TableGen figure
out the index of the pointer argument that needs checking. That's better than
scanning all the arguments regardless. <rdar://problem/10448804>
llvm-svn: 144834
2011-11-16 21:32:23 +00:00
Benjamin Kramer
fee467a0d0
Validate DiagGroup names in TableGen, they're used as command line arguments so we don't want shell meta chars in there.
...
llvm-svn: 144645
2011-11-15 12:54:53 +00:00
Anna Zaks
26573c5585
[analyzer] Testing: test with all the non-experimental checker packages.
...
llvm-svn: 144142
2011-11-08 22:41:25 +00:00
Anna Zaks
a1b56e2aa3
[analyzer] Testing: support for regenerate reference output
...
Change the flow of the SATestAdd so that it could be used for regenerating
the reference output without exiting with an error.
llvm-svn: 144141
2011-11-08 22:41:22 +00:00
Anna Zaks
767d356f87
[analyzer] Testing: Display the number of reported differences in the main log.
...
llvm-svn: 144113
2011-11-08 19:56:31 +00:00
Bob Wilson
e4d7723b87
Check pointer types for arguments of Neon load/store macros. rdar://9958031
...
The Neon load/store intrinsics need to be implemented as macros to avoid
hiding alignment attributes on the pointer arguments, and the macros can
only evaluate those pointer arguments once (in case they have side effects),
so it has been hard to get the right type checking for those pointers.
I tried various alternatives in the arm_neon.h header, but it's much more
straightforward to just check directly in Sema.
llvm-svn: 144075
2011-11-08 05:04:11 +00:00
Bob Wilson
98bc98caa8
Clean up type flags for overloaded Neon builtins. No functional change.
...
This patch just adds a simple NeonTypeFlags class to replace the various
hardcoded constants that had been used until now. Unfortunately I couldn't
figure out a good way to avoid duplicating that class between clang and
TableGen, but since it's small and rarely changes, that's not so bad.
llvm-svn: 144054
2011-11-08 01:16:11 +00:00
Anna Zaks
ae9d54bcf3
[analyzer] Testing infrastructure: flush the output between projects.
...
llvm-svn: 144051
2011-11-08 00:27:56 +00:00
Benjamin Kramer
44f91da8cc
Use StringRef's case transformation methods.
...
llvm-svn: 143889
2011-11-06 20:36:48 +00:00
Anna Zaks
84726dd72c
[analyzer] Relax the cmp criteria for analyzer reports.
...
Until we find out a way to easily find out what changed by looking at the logs.
llvm-svn: 143789
2011-11-05 05:20:56 +00:00
Anna Zaks
4720a730f6
[analyzer] Add support for testing with individual preprocessed files.
...
llvm-svn: 143786
2011-11-05 05:20:48 +00:00
Anna Zaks
42a4463091
[analyzer] Tweak the test script
...
Rename the pre_run_static_analyzer script into cleanup_run_static_analyzer
and use it to clean up after the reference build - which is done as part of
adding a new project to the system.
llvm-svn: 143568
2011-11-02 20:46:50 +00:00
Chandler Carruth
c5d72c103b
Update the CMake build for clang-tblgen to reflect that it directly
...
depends on the Support library rather than relying on TableGen's
transitive dependency.
llvm-svn: 143532
2011-11-02 05:04:43 +00:00
Dan Gohman
c8338b1b14
Remove the Alpha backend.
...
llvm-svn: 143165
2011-10-27 22:56:49 +00:00
Dan Gohman
93127aecb9
Remove the Blackfin backend.
...
llvm-svn: 142881
2011-10-25 00:06:12 +00:00
Dan Gohman
53bb0ff685
Remove the SystemZ backend.
...
llvm-svn: 142879
2011-10-24 23:48:52 +00:00
Bob Wilson
3b476aec6d
Add __nodebug__ attribute to functions in arm_neon.h
...
This matches what we do for Intel vector intrinsics. <rdar://problem/10280207>
llvm-svn: 141958
2011-10-14 16:55:33 +00:00
Richard Smith
caf3390d44
Constant expression evaluation refactoring:
...
- Remodel Expr::EvaluateAsInt to behave like the other EvaluateAs* functions,
and add Expr::EvaluateKnownConstInt to capture the current fold-or-assert
behaviour.
- Factor out evaluation of bitfield bit widths.
- Fix a few places which would evaluate an expression twice: once to determine
whether it is a constant expression, then again to get the value.
llvm-svn: 141561
2011-10-10 18:28:20 +00:00
Peter Collingbourne
bf8989fd19
Make clang-tblgen's Makefile independent of Clang's top-level Makefile,
...
to avoid having to make it available for the cross build when it
builds only clang-tblgen.
llvm-svn: 141453
2011-10-08 00:26:35 +00:00
Anna Zaks
f0c4116202
[analyzer] Static Analyzer Qualification Infrastructure: Scripts to support basic testing of the analyzer on external projects. This can be used as a basis for setting up a buildbot.
...
llvm-svn: 141337
2011-10-06 23:26:27 +00:00
Peter Collingbourne
bee583fd6e
Add the Clang tblgen backends to Clang, and flip the switch to cause
...
the build systems to use clang-tblgen.
llvm-svn: 141291
2011-10-06 13:03:08 +00:00
Anna Zaks
ea8f5725c5
[analyzer] CmpRuns can now optionally delete empty reports.
...
llvm-svn: 139550
2011-09-12 22:40:36 +00:00
Anna Zaks
b80d836137
[analyzer] CmpRuns.cmpScanBuildResults() should be easy to call from other modules.
...
llvm-svn: 139543
2011-09-12 21:32:41 +00:00
Anna Zaks
03f3598ff1
Rename CmpRuns into CmpRuns.py so that it could be used as a module.
...
llvm-svn: 139540
2011-09-12 21:07:18 +00:00
Douglas Gregor
d99d49c6cb
Easier debugging with Visual Studio Visualizers, from Nikola Smiljanic!
...
llvm-svn: 136207
2011-07-27 05:22:46 +00:00
Chris Lattner
57540c5be0
fix a bunch of comment typos found by codespell. Patch by
...
Luis Felipe Strano Moraes!
llvm-svn: 129559
2011-04-15 05:22:18 +00:00
Douglas Gregor
16ac0ad8b4
Minor fix for clang-completion-mode, from Dve Abrahams
...
llvm-svn: 121771
2010-12-14 16:52:29 +00:00
Daniel Dunbar
32f1b54b69
utils/ABITest: Factor out type naming code slightly.
...
llvm-svn: 114867
2010-09-27 20:13:24 +00:00
Daniel Dunbar
1998651529
utils/ABITest: Tweak default bit-field types to cover some more interesting cases.
...
llvm-svn: 114866
2010-09-27 20:13:22 +00:00
Daniel Dunbar
47dd9c2fc5
utils/ABITest: Add a workaround for mismatches due to PR5579.
...
llvm-svn: 114865
2010-09-27 20:13:19 +00:00
Daniel Dunbar
22ec2c218c
utils/ABITest: Add option to skip individual tests by index.
...
llvm-svn: 114864
2010-09-27 20:13:17 +00:00
Douglas Gregor
c3d6cb6543
Fix typo in test program
...
llvm-svn: 108298
2010-07-14 00:09:17 +00:00
Daniel Dunbar
3dbd7b51ca
FuzzTest: Add support for reading list of replacements from a file.
...
llvm-svn: 105177
2010-05-30 22:27:55 +00:00
Daniel Dunbar
ef261ba507
utils: Add a generic fuzz testing tool.
...
llvm-svn: 105176
2010-05-30 22:27:52 +00:00
Ted Kremenek
6542feb92c
Wrap 'data' key in quotes.
...
llvm-svn: 101594
2010-04-17 00:37:35 +00:00
Ted Kremenek
9e9dd5c535
Make script actually work.
...
llvm-svn: 101591
2010-04-17 00:33:24 +00:00
Ted Kremenek
bfd5a75b1c
Log code completion data in json format.
...
llvm-svn: 101587
2010-04-17 00:21:44 +00:00
Ted Kremenek
72ac9505f0
Include sender address in completion log.
...
llvm-svn: 101358
2010-04-15 06:32:15 +00:00
Ted Kremenek
ef0ada67f5
Add simple python server for recording code completion timings.
...
llvm-svn: 101327
2010-04-15 01:02:31 +00:00
Anders Carlsson
5a9754187d
More magic.
...
llvm-svn: 99803
2010-03-29 03:26:49 +00:00
Anders Carlsson
473444e05c
Sprinkle some sed dust over check-ztt to make it work with newer clang asm output. (I am not a sed expert so this might be terribly inefficient :)
...
llvm-svn: 99802
2010-03-29 03:21:40 +00:00
Anders Carlsson
e5d78c03c3
Didn't mean to commit this.
...
llvm-svn: 99607
2010-03-26 04:14:45 +00:00
Anders Carlsson
92d95f2f7b
Use the new vtable layout code for construction vtables.
...
llvm-svn: 99606
2010-03-26 04:13:46 +00:00
Douglas Gregor
e50c05244f
make the vtable tester a little friendlier, with a clean target and without requiring . to be in your path
...
llvm-svn: 99433
2010-03-24 21:52:55 +00:00
Douglas Gregor
a71cc15361
Implement promotion for enumeration types.
...
WHAT!?!
It turns out that Type::isPromotableIntegerType() was not considering
enumeration types to be promotable, so we would never do the
promotion despite having properly computed the promotion type when the
enum was defined. Various operations on values of enum type just
"worked" because we could still compute the integer rank of an enum
type; the oddity, however, is that operations such as "add an enum and
an unsigned" would often have an enum result type (!). The bug
actually showed up as a spurious -Wformat diagnostic
(<rdar://problem/7595366>), but in theory it could cause miscompiles.
In this commit:
- Enum types with a promotion type of "int" or "unsigned int" are
promotable.
- Tweaked the computation of promotable types for enums
- For all of the ABIs, treat enum types the same way as their
underlying types (*not* their promotion types) for argument passing
and return values
- Extend the ABI tester with support for enumeration types
llvm-svn: 95117
2010-02-02 20:10:50 +00:00
Douglas Gregor
efbaf99dca
Include <stdlib.h>, so that we're sure to get atoi.
...
llvm-svn: 95095
2010-02-02 17:49:52 +00:00
Daniel Dunbar
4c823ba358
Extern darwin-clang_rt.c test to also test targetting ARM ({armv6, armv7} x
...
{thumb,no-thumb}).
llvm-svn: 94264
2010-01-23 00:26:38 +00:00