Ted Kremenek
f3f5379f6d
Remove old UninitializedValues analysis.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127656 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-15 03:17:01 +00:00
NAKAMURA Takumi
853134a0ba
lib/Basic/Targets.cpp: __declspec(attr) should be provided on mingw as macro, alias of __attribute__.
...
On mingw without -fms-extensions, we can provide "as-is" __declspec.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127655 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-15 02:32:50 +00:00
NAKAMURA Takumi
f0a6475763
lib/Headers/mm_malloc.h: On Windows, we can expect _mm_malloc would be provided as macro by <malloc.h>.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127654 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-15 02:32:43 +00:00
NAKAMURA Takumi
9db48467f1
lib/Frontend/InitHeaderSearch.cpp: Introduce AddMinGW64CXXPaths(Base) for x86_64-w64-mingw32.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127652 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-15 02:32:36 +00:00
Ken Dyck
6925cc498b
Introduce a CharUnits FieldOffsetInChars variable in AppendField() to
...
replace some uses of FieldOffsetInBytes. The remaining uses of
FieldOffsetInBytes will be replaced once NextFieldOffsetInBytes is converted
to CharUnits. No change in functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127641 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-15 01:09:02 +00:00
Argyrios Kyrtzidis
a8d530e3ad
Stop leaking file descriptors.
...
After the open+fstat optimization, files were already opened for FileManager::getBufferForFile() and we closed them after reading them.
The problem was that when -working-directory was passed, the code path that actually reuses & closes the already opened file descriptor
was not followed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127639 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-15 00:47:44 +00:00
Jakob Stoklund Olesen
112d5ee15a
Revert r127617: "Code generation for noexcept."
...
The tests fail in a -Asserts build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127635 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-15 00:18:21 +00:00
Douglas Gregor
18d8b7996b
Disable 'auto' type deduction in Objective-C. It likes 'id' a bit too
...
much to be useful.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127625 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-14 21:43:30 +00:00
Joerg Sonnenberger
a5ce275749
Sort
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127624 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-14 21:20:46 +00:00
Douglas Gregor
7cbc558ffd
When synthesizing a label declaration based on a goto statement that
...
cannot yet be resolved, be sure to push the new label declaration into
the right place within the identifier chain. Otherwise, name lookup in
C++ gets confused when searching for names that are lexically closer
than the label. Fixes PR9463.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127623 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-14 21:19:51 +00:00
Rafael Espindola
dc0f137295
Switch from internal to linker_private linkage, it is sufficient to please the new linker.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127622 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-14 21:08:19 +00:00
Sebastian Redl
f86d5f2b88
Code generation for noexcept.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127617 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-14 20:33:20 +00:00
Eric Christopher
8a37c79f03
__clear_cache() is varargs and people will occasionally write it without
...
arguments. Process only the arguments that people write, but process
all of them.
Fixes rdar://8900346
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127616 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-14 20:30:34 +00:00
Ted Kremenek
6fb5c1faca
Tweak VariadicMethodTypeChecker to only create one ExplodedNode when issuing multiple warnings for the same message expression.
...
Also add a test case showing that we correctly report multiple warnings for the same message expression.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127605 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-14 19:50:37 +00:00
Ted Kremenek
9fc90c1bf7
Incorporate source ranges for RangeBugReport when coelescing reports into equivalence classes.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127604 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-14 19:50:34 +00:00
Sebastian Redl
56fb926c93
Implement instantiation of noexcept spec and add a test case.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127603 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-14 18:51:50 +00:00
Sebastian Redl
9351b031c4
Add another, pretty trivial, exception spec test case.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127602 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-14 18:51:44 +00:00
Sebastian Redl
8999fe1bc3
Make deallocation functions implicitly noexcept in C++0x.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127596 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-14 18:08:30 +00:00
Rafael Espindola
584acf2ded
Fix link of libxul with LTO and the linker in xcode4. It is not clear if this
...
is working around a bug in ld or if the new linker has a reasonable reason
for wanting the string constant to be linker visible.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127594 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-14 17:55:00 +00:00
Douglas Gregor
069a6da34a
-fwritable-strings should silence warnings about the deprecated string
...
-literal to char* conversion. Make it so.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127586 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-14 16:13:32 +00:00
Fariborz Jahanian
a4fdbfad15
Block return type of the initialized must be
...
be more speciaclized than that of the initializer,
when matching protocol qualifier list.
// rdar:// 9118343.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127585 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-14 16:07:00 +00:00
Douglas Gregor
814638ed5a
Support Ubuntu hardy and intrepid, from Thomas Gamper!
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127583 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-14 15:39:50 +00:00
Douglas Gregor
5370383567
Add include paths for Gentoo Linux, from Marcin Mirosław!
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127582 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-14 15:33:44 +00:00
David Chisnall
b2eb86ff8a
Fix incorrect linkage specifiers for selectors.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127580 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-14 15:01:16 +00:00
Oscar Fuentes
6656457a0a
Fix LIBCLANG_LINK_FLAGS for Darwin.
...
The previous syntax created a list with the usual semicolon as
separator, which breaks the link command.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127579 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-14 14:32:16 +00:00
Anders Carlsson
2e2468e2d2
Get rid of the static FileManager::FixupRelativePath.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127573 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-14 01:13:54 +00:00
Anders Carlsson
4597b7b28e
Add an Objective-C checker that checks that arguments passed to some variadic Objective-C methods are of Objective-C pointer types.
...
Ted or Argiris, I'd appreciate a review!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127572 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-13 20:35:21 +00:00
Anders Carlsson
d05c2006f2
Change GetNullarySelector and GetUnarySelector to take a StringRef.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127571 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-13 20:32:45 +00:00
Sebastian Redl
8026f6d82f
Instead of storing an ASTContext* in FunctionProtoTypes with computed noexcept specifiers, unique FunctionProtoTypes with a ContextualFoldingSet, as suggested by John McCall.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127568 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-13 17:09:40 +00:00
Oscar Fuentes
0b34dbaafe
Build libclang as a static library too. Now tested on Windows!
...
On Windows only the shared library is created. The reason for this is
that clang.lib the static library would clash with clang.lib the
export library of the dll.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127566 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-13 15:10:24 +00:00
Oscar Fuentes
d9e9b8f195
Reverting "Build libclang as a static library too."
...
This reverts commit r127556. It breaks the build for MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127564 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-13 04:28:29 +00:00
Ted Kremenek
e9cd9c0016
Fix CFG assertion failure reported in PR 9467. This was due to recent changes in optimizing CFGs for switch statements.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127563 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-13 03:48:04 +00:00
Jakob Stoklund Olesen
603ea78728
XFAIL this on windows where <vector> contains surprises.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127559 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-13 00:55:43 +00:00
Oscar Fuentes
29f4bacada
Build libclang as a static library too.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127556 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-12 22:01:58 +00:00
Fariborz Jahanian
90ba78c64d
Place duplicate argument declaration in in
...
method prototypes under the -Wduplicate-method-arg and
turn it off by default.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127552 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-12 18:54:30 +00:00
Sebastian Redl
f9c32eb0f8
Revert "Disable delegating constructors for 2.9"
...
It is only meant for the release branch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127544 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-12 13:53:51 +00:00
Sebastian Redl
9d0af360ec
Disable delegating constructors for 2.9
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127543 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-12 13:53:47 +00:00
Sebastian Redl
caa35e4bbf
Revert "Disable inherited constructors for 2.9."
...
It is only meant for the release branch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127542 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-12 13:44:32 +00:00
Sebastian Redl
a808c544f9
Disable inherited constructors for 2.9.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127541 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-12 13:44:23 +00:00
Ken Dyck
f004da49ea
Use CharUnits for argument passed to AppendPadding() from AppendBitField().
...
No change in functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127538 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-12 12:03:11 +00:00
Sebastian Redl
60618fa7f8
Propagate the new exception information to FunctionProtoType.
...
Change the interface to expose the new information and deal with the enormous fallout.
Introduce the new ExceptionSpecificationType value EST_DynamicNone to more easily deal with empty throw specifications.
Update the tests for noexcept and fix the various bugs uncovered, such as lack of tentative parsing support.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127537 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-12 11:50:43 +00:00
Abramo Bagnara
796aa443ab
Forgotten part of previous commit.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127536 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-12 11:17:06 +00:00
Abramo Bagnara
3deeb6deae
Fixed type and declaration source range in presence of typeQuals.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127535 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-12 11:02:00 +00:00
Abramo Bagnara
06dec892b5
Renamed OffsetOfNode::getRange to getSourceRange for uniformity.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127534 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-12 09:45:03 +00:00
Ted Kremenek
9ede307601
Tweak test to hopefully appease FreeBSD buildbot.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127533 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-12 08:19:43 +00:00
Ted Kremenek
e56d349c90
Remove stray output file.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127532 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-12 06:15:01 +00:00
Ted Kremenek
ade3195a20
Re-enable the IdempotentOperations checker for --analyze, and put it and the DeadStores checker into the "deadcode" group.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127531 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-12 06:14:28 +00:00
Ted Kremenek
7084da3e94
Don't have side-effects (or rather non-trivial computation) in StringSwitch "cases."
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127528 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-12 04:08:07 +00:00
Ted Kremenek
dd54de85cd
Add initial version of "IteratorsChecker", a checker to find misues uses of C++ iterators.
...
This checker was created by Jim Goodnow II, and I migrated it to the
new Checker interface (recent changes by Argiris).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127525 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-12 02:49:15 +00:00
Ted Kremenek
e75f4c6f09
Fix comments, and force auto progagation in VisitAggExpr.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127524 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-12 02:49:11 +00:00