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

25649 Коммитов

Автор SHA1 Сообщение Дата
Ted Kremenek e3fe4cb056 Update checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119318 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 01:56:23 +00:00
John McCall 916c870442 Add an ExternalASTSource hook to complete a type on demand.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119316 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 01:44:35 +00:00
Bob Wilson 560ba1472c Add a test for Neon vector mangling
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119304 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 00:32:31 +00:00
Bob Wilson 541b99466e Add tests for new Neon vector type attributes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119303 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 00:32:28 +00:00
Bob Wilson ec33cbeab9 Update TypePrinter::PrintVector to handle new Neon vector types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119302 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 00:32:26 +00:00
Bob Wilson 4211bb68cf Add support for "neon_vector_type" and "neon_polyvector_type" attributes
to create the special Neon vector types.  These are intended to be used in
Clang's version of <arm_neon.h> to define special Neon vector types that will
be mangled according to ARM's ABI.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119301 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 00:32:24 +00:00
Bob Wilson 231da7eb3d ASTContext::getVectorType should preserve the vector kind for canonical types.
This is needed for Neon types when it is most natural to define them in terms
of a typedef.  For example, Neon poly8_t is a typedef for "signed char", and
we want to define polynomial vectors as vectors of that typedef.  Without this
change, the result will be a generic GCC-style vector.  I think this is safe
for other vector types as well, but I would appreciate a review of this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119300 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 00:32:20 +00:00
Bob Wilson 57147a8615 Change CXXNameMangler::mangleNeonVectorType to require the vector type to be
one of the special Neon types.  We'll check for invalid Neon vectors when
they are created, so there's no point in handling them when mangling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119299 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 00:32:18 +00:00
Bob Wilson 56affbcaef Fix a comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119298 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 00:32:16 +00:00
Bob Wilson 3a7230218d Use getTypeSize() method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119297 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 00:32:12 +00:00
John McCall 5082d34e41 Add another case to the whitelist of cast kinds that can convert to bool.
Fixes PR8608.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119293 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 00:12:50 +00:00
Ted Kremenek d1ded66c4e CursorVisitor: cache worklists created for data-recursion to reduce malloc() traffic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119290 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-15 23:31:32 +00:00
John McCall 7cd7d1ad33 Add a new expression kind, OpaqueValueExpr, which is useful for
certain internal type-checking procedures as well as for representing
certain implicitly-generated operations.  Uses to follow.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119289 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-15 23:31:06 +00:00
Zhanyong Wan d776c46691 Adds a README for the Clang static analyzer to document its design and work flow. The contents are taken from email notes by kremenek and xuzhongxing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119288 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-15 23:19:25 +00:00
Ted Kremenek 37f1ea0eb0 Use LLVM_ATTRIBUTE_NOINLINE instead of attribute((noinline)).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119287 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-15 23:11:54 +00:00
Douglas Gregor 08bb4c622d Tweak libclang's heuristics for building precompiled preambles and
caching global code-completion results. In particular, don't perform
either operation the first time we parse, but do both after the first
reparse. 


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119285 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-15 23:00:34 +00:00
Ted Kremenek e4ae4dc87f Remove invalid assertion from CFG builder. When building the CFG pieces for a ternary '?' expression,
it is possible for the confluence block to only have a single predecessor due to calls to 'noreturn'
functions.  Fixes assertion failure reported in PR 8619.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119284 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-15 22:59:22 +00:00
Ted Kremenek 82f3c50fa1 Cast pointers instead of returning a new value within RunVisitorWorkList().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119282 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-15 22:23:26 +00:00
Ted Kremenek 3cb7ba0010 Annotate CursorVisitor::VisitDataRecursive() with attribute 'noinline'.
Clang currently uses a ridiculous amount of stack space when inlining
this function, which can lead to premature stack overflows.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119281 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-15 22:23:24 +00:00
Ted Kremenek d6543f8bba Add method ParentMap::addStmt().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119181 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-15 20:54:24 +00:00
Ted Kremenek 948163b498 Relax assertion in SValuator so that we don't crash when analyzing a call via a function pointer that
casts the return value to something completely different.  While we need better reasoning here,
we should definately not crash.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119177 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-15 20:09:42 +00:00
Fariborz Jahanian 2715b207a6 Some cleanup of block API code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119174 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-15 19:19:38 +00:00
Rafael Espindola 26f14c309e Fixes PR8611.
Silence warning about -g not being used during linking. I couldn't find any
change in behavior in gcc liking when given -g. Please open another bug if
I missed something.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119166 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-15 18:28:16 +00:00
Fariborz Jahanian 5c8e13ffa8 Restore these tests. I think I fixed the problem.
We shall see.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119158 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-15 17:06:17 +00:00
Douglas Gregor 8d706ecf48 Implement C++0x [temp.func.order]p3 (aka DR532) properly. In
particular, we only add the implement object parameter type if only
one of the function templates is a non-static member function
template.

Moreover, since this DR differs from existing practice in C++98/03,
this commit implements the existing practice (which ignores the
first parameter of the function template that is not the non-static
member function template) in C++98/03 mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119145 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-15 15:41:16 +00:00
Chandler Carruth 858a546d8f Silence an unused variable warning during release builds by folding the
expression into the assert.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119143 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-15 13:54:43 +00:00
John McCall 0c6d28d674 Yes, vector conversions are bitcasts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119141 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-15 10:08:00 +00:00
John McCall a5bbc50b1e Kill CK_Unknown references in the ObjC rewriter. The actual
choice of cast doesn't matter here, but I've tried to choose
the right one anyway.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119140 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-15 09:46:46 +00:00
Chandler Carruth 5619ae5d25 Fix a think-o. Fixes PR8606.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119139 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-15 09:28:23 +00:00
John McCall daa8e4e888 Assorted work leading towards the elimination of CK_Unknown.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119138 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-15 09:13:47 +00:00
Zhongxing Xu 5ede807c11 Add driver support for Ubuntu 9.10.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119137 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-15 09:01:52 +00:00
Zhongxing Xu 9c6cd67ea4 Add skeleton for handling other kinds of CFGElements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119135 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-15 08:48:43 +00:00
Chandler Carruth c09265a5fd Clean up some names and fix the handling of default sysroots on Windows and
other platforms where the textual default of '/' isn't the system's root
directory. We should probably still make the textual default platform specific,
but this should avoid the particularly bad problem with the previous state: we
applied a sysroot of '/' to '/usr/local/google' which added
'//usr/local/include' to the windows header search path, a share on another
machine named 'usr'. Oops.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119131 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-15 07:15:26 +00:00
Chandler Carruth f3721457cd Switch the sysroot logic to use the Path interface, resolving a FIXME and
making the code less gross.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119099 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-15 00:48:13 +00:00
Chandler Carruth 5853b0f117 Make sysroot only apply to baked in paths which start with a '/'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119095 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-15 00:05:18 +00:00
Ted Kremenek 1b27ab3152 Revert r119045. It was failing on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119048 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-14 17:53:34 +00:00
Ted Kremenek 6c53fdd88f "Fix" some unintentional fallout from converting
the Stmt* visitation in CursorVisitor to be
data-recursive.

Since AnnotationTokensWorker explicitly calls
CursorVisitor::VisitChildren(), it essentially
transforms the data-recursive algorithm in
CursorVisitor back into a non-data recursive one.
This is particularly bad because the data-recursive
algorithm uses more stack space per stack frame,
which can cause us to blow the stack in some cases.

"Fix" this by making the stack that AnnotationTokensWorker
runs in really huge.  The real fix is to modify
AnnotationTokensWorker not to do the explicit
recursive call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119047 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-14 17:47:35 +00:00
Ted Kremenek b9ce656758 Clean up initialization of LangOptions object by splitting part of it into a parent class
'LangOptionsBase' that default initializes all flags to 0.  Now the ctor of LangOptions
only initializes the flags that might be non-zero (significantly simplifying things).

This also appeases Valgrind on Mac OS X, which no longer reports that one of the flags
may be uninitialized.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119045 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-14 17:04:23 +00:00
Zhongxing Xu 249c9458e2 Revert r118991.
Elidable CXXConstructExpr should inhibit calling destructor for temporary 
that is copied, not the one created. This is because eliding copy constructor 
means that the object that was to be copied will be constructed directly in 
memory the copy would be constructed in.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119044 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-14 15:23:50 +00:00
John McCall ff624c195e Always emit full loads from volatile complex l-values.
Return the result of a complex assignment with the original values,
not by performing a load from the l-value;  this is the correct
semantics in C, although not in C++.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119037 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-14 09:40:28 +00:00
John McCall f3ea8cfe6b Add a few more complex-related cast kinds that arise due to arbitrary
implicit conversions;  the last batch was specific to promotions.
I think this is the full set we need.  I do think dividing the cast
kinds into floating and integral is probably a good idea.

Annotate a *lot* more C casts with useful cast kinds.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119036 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-14 08:17:51 +00:00
Chris Lattner 81921cc421 typo2
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119035 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-14 07:30:46 +00:00
Chris Lattner d9957d31b1 fix typo
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119034 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-14 07:09:32 +00:00
Ted Kremenek 2bd1e7cf88 CursorVisitor: make data-recursion algorithm the default except for the few remaining Exprs still
covered by the normal recursive visitation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119030 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-14 05:45:47 +00:00
Ted Kremenek 91fc0259d2 Remove stale #include.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119028 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-14 05:28:43 +00:00
Fariborz Jahanian eec82172dc Removed unnecessary initialization of a flag which
somehow got several block tests fail with a linux built
compiler.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119027 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-14 05:25:15 +00:00
NAKAMURA Takumi 6c7b42faab Makefile: Follow r118918, to add configuration "ENABLE_DOCS".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119025 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-14 03:29:27 +00:00
NAKAMURA Takumi af5fd25a80 test/CodeGenCXX/dyncast.cpp: Remove XFAIL:win32 with tweaking llvm/utils/FileCheck in r119023, due to DOSish crlf issue.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119024 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-14 03:29:22 +00:00
Fariborz Jahanian bc74764e47 Initialize couple of fields.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119014 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-13 23:48:30 +00:00
Fariborz Jahanian 3d56065cc3 Removing these test till redo them so they won't depend
on the built compiler.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119013 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-13 23:04:46 +00:00