Ted Kremenek
ede538f187
Update checker build.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90062 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 06:48:25 +00:00
Ted Kremenek
d4daa7cbd4
Fix null dereference in UndefResultChecker identified by running the analyzer over Postgresql.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90060 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 06:37:44 +00:00
Daniel Dunbar
e50c16773b
Add clang -cc1 parsing for LangOptions.
...
- This is the last major parsing piece, main FIXMEs remain.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90059 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 05:52:21 +00:00
Daniel Dunbar
87e2496887
clang-cc: Tweak LangOptions parsing to make it a bit more obvious what depends on what.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90058 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 03:18:48 +00:00
Sean Hunt
f4fdd9b58c
Fix 80-cols violations
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90057 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 03:04:53 +00:00
Daniel Dunbar
7674352cf3
clang-cc: Change -fsigned-char=0 to -fno-unsigned-char and pass -pic-level using separate args.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90054 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 02:39:08 +00:00
Daniel Dunbar
fb435102b1
Add missing accessors.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90053 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 02:38:55 +00:00
Daniel Dunbar
1b0969590e
Change LangOptions::ObjCConstantStringClass to an std::string to avoid worrying about the lifetime.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90052 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 02:38:47 +00:00
Daniel Dunbar
7d065d0f21
Move MainFileName option variable into CodeGenOptions instead of LangOptions.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90051 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 02:38:34 +00:00
Benjamin Kramer
85b4521e34
Remove remaining VISIBILITY_HIDDEN from anonymous namespaces.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90044 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 19:45:26 +00:00
Benjamin Kramer
770b4a8834
Remove VISIBILITY_HIDDEN from lib/AST.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90043 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 19:03:38 +00:00
Kovarththanan Rajaratnam
59c55e7249
This patch adds a PUNCTUATOR macro (specialization of TOK) in TokenKinds.def and makes use of it in tok::getTokenSimpleSpelling.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90042 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 16:09:28 +00:00
Kovarththanan Rajaratnam
149594457d
Cleanup llvm/Support/Compiler.h include in header files
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90040 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 16:08:10 +00:00
Nuno Lopes
6e8c7acb61
cleanup parsing of MS integer suffixes a little. this fixes PR5616
...
btw, I believe that isMicrosoftInteger can go away; it's not read anywhere
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90036 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 13:37:52 +00:00
Benjamin Kramer
408ac1767a
Missed a forward declaration.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90035 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 12:08:44 +00:00
Benjamin Kramer
58652887b0
Cleanup includes and forward decls.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90034 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 10:50:44 +00:00
Benjamin Kramer
bd21828179
Remove VISIBILITY_HIDDEN from anonymous namespaces in libFrontend.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90033 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 10:07:24 +00:00
Benjamin Kramer
0c5db87c03
Remove unneeded includes.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90032 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 09:41:31 +00:00
Kovarththanan Rajaratnam
1a9724b697
Don't call exit(). llvm::llvm_report_error() will do just that
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90031 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 09:11:46 +00:00
Sean Hunt
e6252d1587
Fix test and handle IK_LiteralOperatorId in a few more places.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90030 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 08:58:14 +00:00
Kovarththanan Rajaratnam
d06ab9d442
Move program actions implications to clang::InitializeFrontendOptions which already contains such logic.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90029 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 07:52:34 +00:00
Kovarththanan Rajaratnam
ba5fb5a955
lib/Analysis: Remove VISIBILITY_HIDDEN from definitions in anonymous namespace
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90028 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 06:07:30 +00:00
Sean Hunt
0486d74601
Add Parser support for C++0x literal operators ('operator "" i').
...
DeclarationName can't handle them yet, so right now Parser just errors out on them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90027 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 04:44:28 +00:00
Eli Friedman
fa3e82ba04
Tests now pass with the assertion.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90026 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 03:35:45 +00:00
Eli Friedman
8432f25cb2
Add a much more thorough test of casts to virtual bases, and fix
...
GetCXXBaseClassOffset to actually pass the test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90025 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 03:31:34 +00:00
Anders Carlsson
724e3e24dd
We always want to create a virtual function pointer entry if the path from the derived return value to the base overridden return value contains a virtual base class.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90024 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 03:03:52 +00:00
Anders Carlsson
1fb7cf9214
Add an iterator for walking the primary base chain.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90023 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 00:50:23 +00:00
Anders Carlsson
27f69d0793
Move the vtable builder to an anonymous namespace.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90021 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-27 22:21:51 +00:00
Anders Carlsson
261fba6cf5
Use a PointerIntPair for the PrimaryBaseInfo. Yay for clever LLVM data structures!
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90020 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-27 22:14:40 +00:00
Anders Carlsson
ce2009ab2f
Add a new PrimaryBaseInfo struct that combines the record decl of a primary base with whether it's virtual or not.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90018 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-27 22:05:05 +00:00
Anders Carlsson
d6b07fb9ca
Don't build the entire vtable when all we want is the index of a virtual method.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90017 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-27 20:47:55 +00:00
Daniel Dunbar
83d5a2a7d5
Fix typo, thanks Sebastian!
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89999 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-27 08:26:07 +00:00
Daniel Dunbar
b8bef26c8d
Simplify.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89998 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-27 08:26:00 +00:00
Eli Friedman
9b3727457d
Some member pointer casting tests.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89989 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-27 04:56:40 +00:00
Eli Friedman
c6fdb7765f
Add case for CK_DerivedToBaseMemberPointer cast kind to
...
AggExprEmitter::VisitCastExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89988 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-27 04:46:20 +00:00
Eli Friedman
d888962cff
More work on ScalarExprEmitter::EmitCastExpr: for every cast kind, either
...
implement it explicitly or assert that it doesn't make sense for a scalar.
This caught a couple interesting issues: one, CK_BaseToDerivedMemberPointer
casts were getting silently miscompiled, and two, Sema was constructing some
strange implicit casts of type CK_UserDefinedConversion.
The change in SemaExprCXX makes sure the cast kinds are getting set correctly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89987 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-27 04:41:50 +00:00
Eli Friedman
8c3e7e7dda
Cleanup for ScalarExprEmitter::EmitCastExpr; no functional changes.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89986 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-27 02:07:44 +00:00
Eli Friedman
c16668acc9
Fix for PR5594: use EmitGlobalDefinition instead of EmitCXXDestructor so that
...
we check whether the vtable needs to be generated.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89984 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-27 01:42:12 +00:00
Anders Carlsson
1a68972b54
Fix thinko.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89983 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-27 01:26:58 +00:00
Anders Carlsson
d5a942b911
When adding an implicit destructor, make sure to mark it as virtual if it overrides existing destructors.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89967 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-26 21:25:09 +00:00
Anders Carlsson
954968034e
Correctly find overridden destructors.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89966 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-26 20:50:40 +00:00
Anders Carlsson
6d4ccb729c
Lazily create the __cxa_pure_virtual reference.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89965 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-26 19:54:33 +00:00
Anders Carlsson
5dd730ae29
Use the new CovariantThunkAdjustment in the vtable builder.
...
Make the pure virtual methods map a set instead.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89961 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-26 19:32:45 +00:00
Gabor Greif
56e4713620
typo
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89949 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-26 15:18:50 +00:00
Gabor Greif
a4e476d388
issue a friendlier error if someone tries to send precompiled header to '-' (stdout)
...
this brings the error on
clang -c foo.h -o -
closer to
clang -c foo.h -o /dev/null
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89948 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-26 14:35:28 +00:00
Benjamin Kramer
39411b9e90
Remove dead forward declaration. Fix struct/class mismatch. Remove trailing whitespace.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89947 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-26 13:09:03 +00:00
Daniel Dunbar
3fc7e450e2
Remove header which is bringing libAST in (on MSVC).
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89946 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-26 09:57:25 +00:00
Eli Friedman
552a43b297
Remove unused variable.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89945 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-26 07:48:44 +00:00
Eli Friedman
ae32e2459e
Shortcut explicit calls to a trivial copy assignment operator.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89944 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-26 07:45:48 +00:00
Eli Friedman
15233e5a4d
Simplify and fix up the handling of implicit constructors, copy assignment
...
operators, and destructors. Avoids generating declarations/definitions of
trivial constructors/destructors, and makes sure the trivial copy assignment
operator is generated when necessary.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89943 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-26 07:40:08 +00:00