Граф коммитов

589 Коммитов

Автор SHA1 Сообщение Дата
Anna Zaks 2a84b8bd10 [analyzer] CmpRuns should include file name in the issue identifier.
This prevents us from treating the issues from different files with the
same function names and same offsets as the same.

The issue identifier now includes the file name. Also added a way to
strip off the root directories form the source file names.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161150 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-02 00:41:40 +00:00
Jordan Rose dba417ce68 SATestBuild should not ask for non-existent checkers.
- "cocoa" was moved to "osx.cocoa" a long time ago.
- "cplusplus" would be a valid package except we don't have any C++ checkers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160821 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-26 22:31:59 +00:00
Jordan Rose ac57d47546 Un-break standalone invocations of CmpRuns.py.
Fallout from CmpRuns.py API changes in r160314.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160800 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-26 20:03:51 +00:00
Michael Han cc4748a0cb Remove an unused header
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160492 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-19 04:10:19 +00:00
Anna Zaks 7acc407240 [analyzer] Make CmpRuns external-user friendly.
CmpRuns can be used for static analyzer bug report comparison. However,
we want to make sure external users do not rely on the way bugs are
represented (plist files). Make sure that we have a user
friendly/documented API for CmpRuns script.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160314 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-16 20:21:42 +00:00
Ted Kremenek e8cf7d1434 Re-apply r159875 with fixes.
- Split pedantic driver flag test into separate test file, and XFAIL on cygwin,mingw32
- Fix bug in tablegen logic where a missing '{' caused errors to be included in -Wpedantic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159892 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-07 05:53:30 +00:00
NAKAMURA Takumi 3b4c532596 Revert rr159875, "Implement -Wpedantic and --no-pedantic to complement -Weverything." It broke several builds.
I suspect FileCheck might match assertion failure, even if clang/test/Misc/warning-flags.c passed the test.

> 0. Program arguments: bin/./clang -### -pedantic -Wpedantic clang/test/Driver/warning-options.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159886 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-07 02:48:02 +00:00
Ted Kremenek 25570a94ca Implement -Wpedantic and --no-pedantic to complement -Weverything.
This patch introduces some magic in tablegen to create a "Pedantic" diagnostic
group which automagically includes all warnings that are extensions.  This
allows a user to suppress specific warnings traditionally under -pedantic used
an ordinary warning flag.  This also allows users to use #pragma to silence
specific -pedantic warnings, or promote them to errors, within blocks of text
(just like any other warning).

-Wpedantic is NOT an alias for -pedantic.  Instead, it provides another way
to (a) activate -pedantic warnings and (b) disable them.  Where they differ
is that -pedantic changes the behavior of the preprocessor slightly, whereas
-Wpedantic does not (it just turns on the warnings).

The magic in the tablegen diagnostic emitter has to do with computing the minimal
set of diagnostic groups and diagnostics that should go into -Wpedantic, as those
diagnostics that already members of groups that themselves are (transitively) members
of -Wpedantic do not need to be included in the Pedantic group directly.  I went
back and forth on whether or not to magically generate this group, and the invariant
was that we always wanted extension warnings to be included in -Wpedantic "some how",
but the bookkeeping would be very onerous to manage by hand.

-no-pedantic (and --no-pedantic) is included for completeness, and matches many of the
same kind of flags the compiler already supports.  It does what it says: cancels out
-pedantic.  One discrepancy is that if one specifies --no-pedantic and -Weverything or
-Wpedantic the pedantic warnings are still enabled (essentially the -W flags win).  We
can debate the correct behavior here.

Along the way, this patch nukes some code in TextDiagnosticPrinter.cpp and CXStoredDiagnostic.cpp
that determine whether to include the "-pedantic" flag in the warning output.  This is
no longer needed, as all extensions now have a -W flag.

This patch also significantly reduces the number of warnings not under flags from 229
to 158 (all extension warnings).  That's a 31% reduction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159875 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 23:07:31 +00:00
Dmitri Gribenko 8d3ba23f2d Implement AST classes for comments, a real parser for Doxygen comments and a
very simple semantic analysis that just builds the AST; minor changes for lexer
to pick up source locations I didn't think about before.

Comments AST is modelled along the ideas of HTML AST: block and inline content.

* Block content is a paragraph or a command that has a paragraph as an argument
  or verbatim command.
* Inline content is placed within some block.  Inline content includes plain
  text, inline commands and HTML as tag soup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159790 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 00:28:32 +00:00
Anna Zaks 84c1f4b1ed [analyzer] Add a statistic for maximum CFG size and a script to summarize analyzer stats from scan-build output.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159776 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-05 20:44:02 +00:00
NAKAMURA Takumi 41de13b3b6 clang/utils/TableGen/ClangAttrEmitter.cpp: Fix abuse of StringRef (from getValueAsString()).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159662 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-03 14:45:09 +00:00
Sean Hunt 8571897a79 Fix a thinko and a stray debugging hunk in my attributes patch. Thanks to Jordan
Rose and Richard Smith for catching these.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158826 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-20 16:05:42 +00:00
Sean Hunt 8e083e71d4 Reapply r158700 and fixup patches, minus one hunk that slipped through and
caused a crash in an obscure case. On the plus side, it caused me to catch
another bug by inspection.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158767 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-19 23:57:03 +00:00
Jakob Stoklund Olesen 3532936f4f Revert r158700 and dependent patches r158716, r158717, and r158731.
The original r158700 caused crashes in the gcc test suite,
g++.abi/vtable3a.C among others. It also caused failures in the libc++
test suite.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158749 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-19 21:48:43 +00:00
Sean Hunt b5aa17c5a1 Remove redundant uses of SmallString
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158731 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-19 18:12:18 +00:00
Sean Hunt c20c4e79ae Stop abusing StringRef. Fixes the Windows build.
I've also removed the duplicate check for PARSED_ATTR since it seems
unnecessary, and would have made the code more complicated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158716 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-19 13:36:02 +00:00
Sean Hunt bfcb037a34 Improve the specification of spellings in Attr.td.
Note that this is mostly a structural patch that handles the change from the old
spelling style to the new one. One consequence of this is that all AT_foo_bar
enum values have changed to not be based off of the first spelling, but rather
off of the class name, so they are now AT_FooBar and the like (a straw poll on
IRC showed support for this). Apologies for code churn.

Most attributes have GNU spellings as a temporary solution until everything else
is sorted out (such as a Keyword spelling, which I intend to add if someone else
doesn't beat me to it). This is definitely a WIP.

I've also killed BaseCheckAttr since it was unused, and I had to go through
every attribute anyway.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158700 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-19 03:39:03 +00:00
Sean Hunt 93f95f2a2c Handle C++11 attribute namespaces automatically.
Now, as long as the 'Namespaces' variable is correct inside Attr.td, the
generated code will correctly admit a C++11 attribute only when it has the
appropriate namespace(s).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158661 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-18 16:13:52 +00:00
Jakob Stoklund Olesen 3cc509b5ac Make clang-tblgen backends functions instead of TableGenBackends.
Get rid of a bunch of header files. TableGen output should be unaffected.

Patch by Sean Silva!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158388 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-13 05:12:41 +00:00
Anna Zaks 19b17cb57a [analyzer] Use "issue hash" in CmpRuns; followup on r158180
(For the future: It would be more efficient to produce a hash key with
the embedded function info inside the compiler.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158187 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-08 01:50:49 +00:00
Douglas Gregor 3f1a5a2553 Minor comments and changes to clang-completion-mode.el, from David Wood!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158174 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-07 22:33:29 +00:00
Jordan Rose 04bc014dfd [analyzer] SATestBuild should execute SVN updates even if Verbose is off.
Also, re-use glob results when looking for failure logs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157817 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-01 16:24:43 +00:00
Jordan Rose 6d7e372799 [analyzer] Fix SATestAdd to work with SATestBuild.
Also, eliminate global 'IsReferenceBuild' in SATestBuild. It doesn't get
passed around that much.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157816 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-01 16:24:38 +00:00
Aaron Ballman 46eb6ca7f2 Updating the visualizers to include more datatypes. Patch thanks to Jay Blanchard.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157763 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-31 19:27:30 +00:00
Jim Grosbach b4a542549c TableGen: Remove extraneous '\' at EOL in generated tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157700 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-30 18:18:29 +00:00
Ted Kremenek 7c45163d4d Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157229 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-22 00:54:40 +00:00
Ted Kremenek 86674ec4bf Use Perl prototypes instead of shift.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157228 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-22 00:52:49 +00:00
Ted Kremenek 3a46530395 Add basic delta-debugging script used for reducing analyzer crasher test cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157219 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-21 23:29:01 +00:00
David Blaikie c4968d67b4 SmallString Visual Studio visualizer by Will Wilson.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156959 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-16 22:28:47 +00:00
Rafael Espindola 31c195ac0f 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156821 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15 14:09:55 +00:00
Douglas Gregor 703d412d19 Teach the parser to deal with multiple spellings for the same
attribute, rather than requiring multiple cases in consumers of this
information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156666 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-11 23:37:49 +00:00
Jim Grosbach 667381b21f ARM: Support marking intrinsic definitions as 'unavailable'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156490 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-09 18:17:30 +00:00
Richard Smith 46484770fe Remove DiagGroups from notes, and add a TableGen assertion to catch them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156192 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-04 19:05:50 +00:00
Douglas Gregor 0c19b3c38e 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!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156003 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-02 17:33:51 +00:00
Douglas Gregor 331d2ec7cd Introduce the notion of 'ignored' attributes, so that all attributes
we accept are not modeled somehow via Attr.td.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155998 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-02 16:18:45 +00:00
Douglas Gregor 3e7d31aa60 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155995 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-02 15:56:52 +00:00
Douglas Gregor d6268ffe94 Revert my optimization to AttributeList::getKind() in r155987;
Benjamin has suggested a better approach.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155989 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-02 14:50:50 +00:00
Douglas Gregor b6dd6055a4 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>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155987 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-02 14:24:30 +00:00
Gabor Greif e47398abd3 Add a FIXME for uncomplete comment
fix a typo
add punctuation


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155443 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 15:42:03 +00:00
David Blaikie 789acdd196 Add SmallVectorImpl Visual Studio visualizer. Patch by Nikola Smiljanic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155140 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 17:26:49 +00:00
Eric Christopher f102c45ed9 Remove the vestiges of the C backend.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153308 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-23 05:51:52 +00:00
Aaron Ballman b017ea237e Adding namespace qualifiers to the visualizers and improving their behavior.
Patch thanks to Nikola Smiljanic

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152514 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-10 22:28:45 +00:00
Argyrios Kyrtzidis 2a6dc143b6 [utils/FuzzTest] Add '--stop-on-fail' to stop the script on the first failure
without reverting the changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152333 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-08 20:29:39 +00:00
Argyrios Kyrtzidis 3cb8e2f5e9 [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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152327 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-08 20:11:06 +00:00
Argyrios Kyrtzidis 00f1f27664 [utils/FuzzTest] For --filelist the option type is string, not integer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152324 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-08 18:56:59 +00:00
Daniel Dunbar 9df08bb766 Spelling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152281 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-08 01:54:33 +00:00
Michael Han e53ac8aea2 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152169 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-07 00:12:16 +00:00
Argyrios Kyrtzidis d42236e9d5 [tablegen] Make sure that the code that is determining the order of warning groups
is shared to avoid any "misalignment" if indices.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152074 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-06 00:00:38 +00:00
Anna Zaks 9747b539cd [analyzer] Testing: These checkers are not experimental anymore.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150989 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-20 21:10:40 +00:00
Benjamin Kramer d49cb20288 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150615 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-15 20:57:03 +00:00
Anna Zaks f66035ec41 [analyzer] Add the Malloc checker to the list of tested checkers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150535 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-15 00:19:07 +00:00
Dmitri Gribenko 5189035553 Add a script that produces a list of all diagnostics that are defined in
Diagnostic*.td files but not used in sources.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150410 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-13 20:21:52 +00:00
Dylan Noblesmith 36d592718f drop more llvm:: prefixes on SmallString<>
More cleanup after r149799.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150380 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-13 12:32:26 +00:00
Daniel Dunbar b880609697 Remove stray semi-colon.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150231 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-10 06:00:29 +00:00
Benjamin Kramer f94d392847 Kill the brief and full explanation fields from StaticDiagInfoRec. They were unused and wasted space for nothing.
- per PR11952.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150199 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-09 19:38:26 +00:00
Aaron Ballman fd8fed902d Added MSVC visualizers for PointerIntPair and PointerUnions.
Patch by Nikola Smiljanic

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149896 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-06 20:47:31 +00:00
Benjamin Kramer 5bbc385ad2 Move instantiateTemplateAttribute into the sema namespace, make helpers static.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149864 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-06 11:13:08 +00:00
Anna Zaks 09e9cf0927 [analyzer] Testing: add automated reference results reset.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149682 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-03 06:35:23 +00:00
Anna Zaks ac4e5b7a11 [analyzer] Testing: add 2 new checkers to the buildbot script.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149514 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-01 16:46:57 +00:00
Anna Zaks 2c3038edc2 [analyzer] Add the HTML file to the SATest diagnostic diff.
(Uses the functionality which has been in CmpRuns long before.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148868 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-24 21:57:35 +00:00
Anna Zaks ab2d46eb04 [analyzer] Testing: make diagnostic diffs more informative (add
diagnostic message).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148867 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-24 21:57:32 +00:00
Anna Zaks 8c345c0fc3 [analyzer] Unbreak the static analyzer bot. Regression from r148558.
When we build a single source file, we call clang directly (not though scan-build).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148612 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-21 01:11:35 +00:00
DeLesley Hutchins 23323e0253 Delayed template instantiation of late-parsed attributes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148595 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-20 22:50:54 +00:00
DeLesley Hutchins 7b9ff0c090 Instantiate dependent attributes when instantiating templates.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148592 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-20 22:37:06 +00:00
Anna Zaks afb51afd98 [analyzer] Tweak the buildbot script to include the experimental taint checker and correct the checker enabling setting.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148558 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-20 19:10:59 +00:00
David Blaikie 7530c034c0 Remove unreachable code in Clang. (replace with llvm_unreachable where appropriate or when GCC requires it)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148292 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-17 06:56:22 +00:00
David Blaikie 561d3abc88 Remove unnecessary default cases in switches over enums.
This allows -Wswitch-enum to find switches that need updating when these enums are modified.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148281 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-17 02:30:50 +00:00
Jakob Stoklund Olesen eb666737ba CodeInit was replaced by StringInit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148095 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-13 04:57:47 +00:00
Anna Zaks d3e29ef3e0 [analyzer] Testing infrastructure: Flush output after every print
statement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147862 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-10 18:10:25 +00:00
Benjamin Kramer 0b536f3281 Remove unused include of VectorExtras.h.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147737 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-07 19:41:22 +00:00
Anna Zaks f063a3b783 [analyzer] Correct the error message in the testing infrastructure.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147568 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-04 23:53:50 +00:00
Bob Wilson 9082cddf28 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146963 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-20 06:16:48 +00:00
David Blaikie 99ba9e3bd7 Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146959 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-20 02:48:34 +00:00
Douglas Gregor 1bea8807bc Add support for pretty-printing attributes, from Richard Membarth!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145002 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-19 19:22:57 +00:00
Bob Wilson 4648255ceb 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>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144834 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-16 21:32:23 +00:00
Benjamin Kramer 037ad1b8f0 Validate DiagGroup names in TableGen, they're used as command line arguments so we don't want shell meta chars in there.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144645 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-15 12:54:53 +00:00
Anna Zaks 8d4a515b03 [analyzer] Testing: test with all the non-experimental checker packages.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144142 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 22:41:25 +00:00
Anna Zaks 86f14abc02 [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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144141 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 22:41:22 +00:00
Anna Zaks a7a2564ff5 [analyzer] Testing: Display the number of reported differences in the main log.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144113 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 19:56:31 +00:00
Bob Wilson 6f9f03ef37 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144075 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 05:04:11 +00:00
Bob Wilson da95f73b59 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144054 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 01:16:11 +00:00
Anna Zaks bc05f57cba [analyzer] Testing infrastructure: flush the output between projects.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144051 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 00:27:56 +00:00
Benjamin Kramer 90c7892b69 Use StringRef's case transformation methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143889 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-06 20:36:48 +00:00
Anna Zaks e1e73670b3 [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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143789 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-05 05:20:56 +00:00
Anna Zaks 45518b1f76 [analyzer] Add support for testing with individual preprocessed files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143786 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-05 05:20:48 +00:00
Anna Zaks 5fa3f1309b [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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143568 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-02 20:46:50 +00:00
Chandler Carruth d4e85faaf3 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143532 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-02 05:04:43 +00:00
Dan Gohman e3271d401e Remove the Alpha backend.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143165 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-27 22:56:49 +00:00
Dan Gohman 78cf13db14 Remove the Blackfin backend.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142881 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-25 00:06:12 +00:00
Dan Gohman 0986eb5c59 Remove the SystemZ backend.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142879 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-24 23:48:52 +00:00
Bob Wilson d1af3b901a Add __nodebug__ attribute to functions in arm_neon.h
This matches what we do for Intel vector intrinsics. <rdar://problem/10280207>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141958 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-14 16:55:33 +00:00
Richard Smith a6b8b2c096 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141561 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-10 18:28:20 +00:00
Peter Collingbourne d7c8556cc1 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141453 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-08 00:26:35 +00:00
Anna Zaks 1b41716abf [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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141337 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-06 23:26:27 +00:00
Peter Collingbourne 51d7777a21 Add the Clang tblgen backends to Clang, and flip the switch to cause
the build systems to use clang-tblgen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141291 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-06 13:03:08 +00:00
Anna Zaks f95a2012ab [analyzer] CmpRuns can now optionally delete empty reports.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139550 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-12 22:40:36 +00:00
Anna Zaks 544055fa46 [analyzer] CmpRuns.cmpScanBuildResults() should be easy to call from other modules.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139543 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-12 21:32:41 +00:00
Anna Zaks 22d70e0ca3 Rename CmpRuns into CmpRuns.py so that it could be used as a module.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139540 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-12 21:07:18 +00:00
Douglas Gregor 3ef1ad2d28 Easier debugging with Visual Studio Visualizers, from Nikola Smiljanic!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136207 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-27 05:22:46 +00:00
Chris Lattner fc8f0e14ad fix a bunch of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129559 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-15 05:22:18 +00:00