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

588 Коммитов

Автор SHA1 Сообщение Дата
Jordan Rose 7bd51ea64f [analyzer] SATestBuild.py: allow make builds to disable parallelization
Before, SATestBuild unilaterally added '-j<n>' to every project built with
'make'. Now, we check and see if there's a -j option already specified, which
allows a project to explicitly be marked '-j1'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168603 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-26 19:59:57 +00:00
Jordan Rose 58782bee56 [analyzer] SATestBuild.py: fix broken string concatenation
This has been broken for a while, but the branch was never being taken.
(We were trying to do 'str + floatVal'; now we do 'str % intVal' and use
the '%d' format.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168174 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-16 17:41:21 +00:00
Argyrios Kyrtzidis fc0eb2a77b [ClangDataFormat.py] Add summary for QualType.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168117 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-16 00:25:26 +00:00
Anna Zaks f0024960d5 [analyzer] CmpRuns: move the clang_version info into the run (out of
report)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168105 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-15 22:42:44 +00:00
Jordan Rose f55a9e5e70 [analyzer] SATestBuild.py: correctly add -j option for projects using make.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168099 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-15 22:03:53 +00:00
Argyrios Kyrtzidis 596be9372b [utils/ClangDataFormat.py] For invalid source locations just return
"<invalid loc>" for summary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168087 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-15 20:59:00 +00:00
Argyrios Kyrtzidis 350aea7b79 [PCH] Reading expressions from attributes should be done using ReadExpr(),
not ReadExpr().

Also add a test case making sure the thread safety attributes work as expected
when they come from a PCH.

Fixes rdar://12584141 & http://llvm.org/PR13982

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168017 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-15 01:31:39 +00:00
Argyrios Kyrtzidis 1a03b262d0 [utils/ClangDataFormat.py] Add data formatter for StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168003 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-14 23:52:19 +00:00
Argyrios Kyrtzidis 29a67e8f3a [utils/ClangDataFormat.py] In the summary of SourceLocation, include whether it is
local or loaded.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168002 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-14 23:52:11 +00:00
Eric Christopher 825d386c1d Remove the cellspu port.
Approved by Chris Lattner.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167983 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-14 22:08:59 +00:00
Anna Zaks 25691f67b2 [analyzer] Ensure that CmpRuns recursively walks the output directory.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167981 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-14 21:32:16 +00:00
Argyrios Kyrtzidis 6af1405ad2 Remove leftover code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167641 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-09 23:02:10 +00:00
Argyrios Kyrtzidis e9d417d9fc Add lldb data formatters for clang classes, starting with SourceLocation.
When installed, instead of getting this:

(lldb) p Tok.Loc
(clang::SourceLocation) $0 = {
  (unsigned int) ID = 123582
}

you'll get:

(lldb) p Tok.Loc
(clang::SourceLocation) $4 = "/usr/include/i386/_types.h:37:1" (offset: 123582, file)

This depends on r167629.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167640 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-09 22:59:01 +00:00
Anna Zaks 765029b34f [analyzer] Test SimpleStream on the buildbot.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167317 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-02 21:30:07 +00:00
Joerg Sonnenberger 6b2b8977bc Don't require exception handling for clang-tblgen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166713 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 20:34:00 +00:00
Joerg Sonnenberger 38859ee4a3 Don't throw exceptions in clang-tblgen by switching to PrintFatalError.
Add locations in a number of places, where they are available for free.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166691 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 16:37:08 +00:00
Michael J. Spencer c635710bcb [Options] Add prefixes to options.
Each option has a set of prefixes. When matching an argument such as
-funroll-loops. First the leading - is removed as it is a prefix. Then
a lower_bound search for "funroll-loops" is done against the option table by
option name. From there each option prefix + option name combination is tested
against the argument.

This allows us to support Microsoft style options where both / and - are valid
prefixes. It also simplifies the cases we already have where options come in
both - and -- forms. Almost every option for gnu-ld happens to have this form.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166444 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-22 22:13:48 +00:00
Anna Zaks 20d928164a [analyzer] CmpRuns: cleanup APIs, allow processing of plists with no
clang_version, fix the compare routine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166129 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-17 21:09:26 +00:00
Anna Zaks 68aa3a9389 [analyzer] Expose clang_version in CmpRuns
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166048 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-16 19:36:39 +00:00
Anna Zaks 81765577db [analyzer] CmpRuns - cleaned up the API, added relative path getter
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165995 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-15 22:48:21 +00:00
Sean Silva b43d87b064 Remove pointless classof()'s.
Updates to llvm/Support/Casting.h have rendered these classof()'s
irrelevant.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165770 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 23:31:23 +00:00
Sean Silva dbd9197574 tblgen: Build clang-tblgen without RTTI.
clang-tblgen no longer needs RTTI!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165650 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-10 20:25:45 +00:00
Sean Silva 1ab4632308 tblgen: Use LLVM-style RTTI in clang-tblgen
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165649 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-10 20:25:43 +00:00
Sean Silva de3832b123 tblgen: Migrate clang-tblgen to new TableGenMain API.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165167 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-03 21:29:30 +00:00
Dmitri Gribenko 0bd9838751 Comment sema: warn when comment has \deprecated but declaration does not have a
deprecation attribute ('deprecated', 'availability' or 'unavailable').

This warning is under a separate flag, -Wdocumentation-deprecated-sync, so it
can be turned off easily while leaving other -Wdocumentation warnings on.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164467 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-22 21:47:50 +00:00
Dmitri Gribenko abcf0dccc9 Comment parsing: handle \deprecated command. It is a block command, but it
should be fine to use it without further explanations in the attached
paragraph, so the warning about empty paragraph was turned off for it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163836 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-13 20:36:01 +00:00
Dmitri Gribenko e4330a302a Comment AST: TableGen'ize all command lists in CommentCommandTraits.cpp.
Now we have a list of all commands.  This is a good thing in itself, but it
also enables us to easily implement typo correction for command names.

With this change we have objects that contain information about each command,
so it makes sense to resolve command name just once during lexing (currently we
store command names as strings and do a linear search every time some property
value is needed).  Thus comment token and AST nodes were changed to contain a
command ID -- index into a tables of builtin and registered commands.  Unknown
commands are registered during parsing and thus are also uniformly assigned an
ID.  Using an ID instead of a StringRef is also a nice memory optimization
since ID is a small integer that fits into a common bitfield in Comment class.

This change implies that to get any information about a command (even a command
name) we need a CommandTraits object to resolve the command ID to CommandInfo*.
Currently a fresh temporary CommandTraits object is created whenever it is
needed since it does not have any state.  But with this change it has state --
new commands can be registered, so a CommandTraits object was added to
ASTContext.

Also, in libclang CXComment has to be expanded to include a CXTranslationUnit
so that all functions working on comment AST nodes can get a CommandTraits
object.  This breaks binary compatibility of CXComment APIs.

Now clang_FullComment_getAsXML(CXTranslationUnit TU, CXComment CXC) doesn't
need TU parameter anymore, so it was removed.  This is a source-incompatible
change for this C API.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163540 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-10 20:32:42 +00:00
Ted Kremenek 9937216955 Add handy script for updating plist FileCheck expected output for
analyzer tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163486 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-10 06:19:34 +00:00
Anna Zaks 817ce3dd26 [analyzer] testing: add a build mode to allow C++11 testing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163357 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-06 23:30:27 +00:00
Roman Divacky 31ba613537 Dont cast away const needlessly. Found by gcc48 -Wcast-qual.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163325 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-06 15:59:27 +00:00
Dmitri Gribenko c24a76e376 Comment HTML tag name machers: move from StringSwitch to an efficient
TableGen-generated string matcher.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162969 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-31 02:21:44 +00:00
Jordan Rose 191e2b1d4a Revert "[analyzer] Disable diagnostic checking on the buildbot."
This reverts commit befc0f648c now that
plist-html diagnostics are working again.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162966 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-31 00:36:30 +00:00
Anna Zaks befc0f648c [analyzer] Disable diagnostic checking on the buildbot.
Due to recent diagnostic changes, we may generate malformed diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162940 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-30 21:04:09 +00:00
Anna Zaks 28694c1fe4 [analyzer] Fixup 162863.
Thanks Jordan.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162875 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-29 23:23:39 +00:00
Anna Zaks 3defb0be1b [analyzer]Fix typo, unbreak static analyzer BuildBot (at least
partially).

(Addresses a regression from r162790.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162864 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-29 21:22:40 +00:00
Ted Kremenek 82778af78a Automatically use more cores when the test build uses 'make'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162790 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-28 20:40:04 +00:00
Ted Kremenek 7c14c44565 Consolidate helper methods and configuration logic. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162789 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-28 20:40:02 +00:00
Ted Kremenek 5abd3d2ba4 Pass --use-analyzer to scan-build when running within the test harness.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162783 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-28 20:20:52 +00:00
Ted Kremenek aade589b2b experimental.security.taint is now alpha.security.taint
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162775 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-28 18:45:22 +00:00
Anna Zaks 210f5a2822 [analyzer] More internal stats collection.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162687 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-27 18:38:32 +00:00
Anna Zaks 44cceb96ea [analyzer] Ted fixed the plist-html issue, so the assert can go away.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162598 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-24 21:07:49 +00:00
Anna Zaks b81a9adc24 [analyzer] Unbreak the static analyzer buildbot.
We no longer associate the correct HTML file with plist diagnostic.
Fall out from r162028.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162071 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-17 01:09:13 +00:00
Richard Smith 0dae729a69 Don't constant-fold when pretty-printing alignment attribute. This fixes a
potential crasher -- Context is sometimes a null reference (!!) here.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162007 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-16 02:43:29 +00:00
Richard Smith b27660a733 Placate the mingw32 buildbot by suffixing 64-bit constants with ULL.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161831 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-14 03:55:16 +00:00
Richard Smith f8ee6bc1ef Fix undefined behavior (and wrong code, as far as I can tell) in NEON builtin
tablegen code, found by -fcatch-undefined-behavior. I would appreciate if
someone more familiar with the NEON code could point me in the direction of how
to write a test for this. We appear to have essentially no test coverage
whatsoever for these builtins.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161827 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-14 01:28:02 +00:00
Ted Kremenek bb5185c0ca Fix horrible regression in control of warnings caused by introduction of -Wpedantic.
While -Wpedantic was reasonable, -Wno-pedantic would turn off a bunch of warnings that
are on by default.  This counters the intention of this warning flag.

To fix this, -Wpedantic now includes extentions that are not on by default.  The
remaining warnings will manifest anyway, and won't accidentally get turned off
by -Wno-pedantic.

Fixes <rdar://problem/12076105>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161695 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-10 20:50:00 +00:00
Joerg Sonnenberger 7094dee95f Add missing cctype includes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161660 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-10 10:58:18 +00:00
Ted Kremenek 4a535368eb Enhance ClangDiagnosticsEmitter to reject diagnostics that are errors that are also
included in warning groups.  Warning groups can only contain warnings, because only
warnings can be mapped to errors or ignored.

This caught a few diagnostics that were incorrectly in diagnostic groups, and
could have resulted in a compiler crash when those diagnostic groups were mapped.

Fixes <rdar://problem/12044436>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161389 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-07 05:01:49 +00:00
Jim Grosbach 66981c7ca1 TableGen: Remove extraneous \ character from arm_neon.h definitions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161244 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 17:30:46 +00:00
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