]>
granicus.if.org Git - clang/log
Daniel Dunbar [Sun, 29 Nov 2009 21:52:53 +0000 (21:52 +0000)]
clang -cc1: Use proper diagnostics for all parsing errors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90100
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 29 Nov 2009 21:23:36 +0000 (21:23 +0000)]
Don't pass false (default) for isVolatile parameter to CreateLoad.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90098
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 29 Nov 2009 21:11:47 +0000 (21:11 +0000)]
Explicitly use setVolatile instead of extra IRBuilder argument.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90095
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 29 Nov 2009 21:11:41 +0000 (21:11 +0000)]
Don't pass false (default) for isVolatile parameter to CreateStore.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90094
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 29 Nov 2009 20:58:50 +0000 (20:58 +0000)]
Change CompilerInvocation::CreateFromArgs to report errors using a proper diagnostic engine.
- Clients that care about having the diagnostics output honor the user-controllable diagnostic options can buffer the diagnostics and issue them later.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90092
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 29 Nov 2009 20:58:39 +0000 (20:58 +0000)]
Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90091
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 29 Nov 2009 20:58:32 +0000 (20:58 +0000)]
Change CompilerInvocation::CreateFromArgs to take Argv0 and the address of main (or something in the main executable) so it can find the builtin compiler files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90090
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 29 Nov 2009 20:18:50 +0000 (20:18 +0000)]
Remove useless c_str() calls in SemaCodeComplete.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90088
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 29 Nov 2009 19:51:45 +0000 (19:51 +0000)]
Simplify code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90087
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 29 Nov 2009 18:27:55 +0000 (18:27 +0000)]
Port BugReporter and BugType to StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90086
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 29 Nov 2009 18:03:28 +0000 (18:03 +0000)]
Kill some unnecessary calls to c_str().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90084
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kovarththanan Rajaratnam [Sun, 29 Nov 2009 17:13:54 +0000 (17:13 +0000)]
Kill off clang/win32 which contains the hand generated Visual Studio project files. These files are severely out of date and have been superseded by the CMake build system. RIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90081
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Sun, 29 Nov 2009 17:07:16 +0000 (17:07 +0000)]
remove stall comment
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90080
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kovarththanan Rajaratnam [Sun, 29 Nov 2009 14:54:35 +0000 (14:54 +0000)]
Streamline Stmt::CollectingStats() and Decl::CollectingStats(). No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90078
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kovarththanan Rajaratnam [Sun, 29 Nov 2009 14:50:29 +0000 (14:50 +0000)]
Don't call Decl::CollectingStats(false) and Stmt::CollectingStats(false). When called with false these functions return whether statistics are enabled. They don't change any state. Since we're not using the return value avoid calling them in the first place.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90077
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kovarththanan Rajaratnam [Sun, 29 Nov 2009 10:09:37 +0000 (10:09 +0000)]
Remove empty test directory. lit was moved to llvm/utils/lit in r82524
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90074
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kovarththanan Rajaratnam [Sun, 29 Nov 2009 09:57:35 +0000 (09:57 +0000)]
This patch moves the frontend timer from clang-cc into CompilerInstance.
CompilerInstance already contains various objects that are used
throughout the entire run.
Also addresses Daniels review comments in:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-
20091123 /024508.html
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90073
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 29 Nov 2009 09:33:20 +0000 (09:33 +0000)]
Use '-FOO' 'BAR' instead of '-FOO=BAR' for FOO in -stack-protector, -fvisibility, and -fconstant-string-class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90072
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 29 Nov 2009 09:33:10 +0000 (09:33 +0000)]
Normalize options to use '-FOO' instead of '--FOO'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90071
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 29 Nov 2009 09:32:38 +0000 (09:32 +0000)]
Remove unnecessary -fblocks=0.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90070
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 29 Nov 2009 09:32:31 +0000 (09:32 +0000)]
Use '-x' 'foo' instead of '-x=foo'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90069
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 29 Nov 2009 09:32:20 +0000 (09:32 +0000)]
clang -cc1: Allow -triple= as an alias for -triple, -code-compiletion-at= as an alias for -code-completion-at, and spell "-std=" option correctly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90068
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 29 Nov 2009 09:32:12 +0000 (09:32 +0000)]
Use '-o' '-' instead of '-o=-' in tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90067
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 29 Nov 2009 09:31:53 +0000 (09:31 +0000)]
Remove unnecessary -fms-extensions=0 from tests (this command line syntax is going away).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90066
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sean Hunt [Sun, 29 Nov 2009 07:34:05 +0000 (07:34 +0000)]
Add DeclarationName support for C++0x operator literals. They should now work as
function names outside of templates - they'll probably cause some damage there as
they're largely untested.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90064
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 29 Nov 2009 07:18:39 +0000 (07:18 +0000)]
Move LLVM backend options to explicit clang-cc / clang -cc1 options, which we then manually pass to the command line library; eventually the latter grossness should be fixed by a real API when creating the target machine.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90063
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 29 Nov 2009 06:48:25 +0000 (06:48 +0000)]
Update checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90062
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 29 Nov 2009 06:37:44 +0000 (06:37 +0000)]
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
Daniel Dunbar [Sun, 29 Nov 2009 05:52:21 +0000 (05:52 +0000)]
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
Daniel Dunbar [Sun, 29 Nov 2009 03:18:48 +0000 (03:18 +0000)]
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
Sean Hunt [Sun, 29 Nov 2009 03:04:53 +0000 (03:04 +0000)]
Fix 80-cols violations
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90057
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 29 Nov 2009 02:39:08 +0000 (02:39 +0000)]
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
Daniel Dunbar [Sun, 29 Nov 2009 02:38:55 +0000 (02:38 +0000)]
Add missing accessors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90053
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 29 Nov 2009 02:38:47 +0000 (02:38 +0000)]
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
Daniel Dunbar [Sun, 29 Nov 2009 02:38:34 +0000 (02:38 +0000)]
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
Benjamin Kramer [Sat, 28 Nov 2009 19:45:26 +0000 (19:45 +0000)]
Remove remaining VISIBILITY_HIDDEN from anonymous namespaces.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90044
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 28 Nov 2009 19:03:38 +0000 (19:03 +0000)]
Remove VISIBILITY_HIDDEN from lib/AST.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90043
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kovarththanan Rajaratnam [Sat, 28 Nov 2009 16:09:28 +0000 (16:09 +0000)]
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
Kovarththanan Rajaratnam [Sat, 28 Nov 2009 16:08:10 +0000 (16:08 +0000)]
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
Nuno Lopes [Sat, 28 Nov 2009 13:37:52 +0000 (13:37 +0000)]
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
Benjamin Kramer [Sat, 28 Nov 2009 12:08:44 +0000 (12:08 +0000)]
Missed a forward declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90035
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 28 Nov 2009 10:50:44 +0000 (10:50 +0000)]
Cleanup includes and forward decls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90034
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 28 Nov 2009 10:07:24 +0000 (10:07 +0000)]
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
Benjamin Kramer [Sat, 28 Nov 2009 09:41:31 +0000 (09:41 +0000)]
Remove unneeded includes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90032
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kovarththanan Rajaratnam [Sat, 28 Nov 2009 09:11:46 +0000 (09:11 +0000)]
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
Sean Hunt [Sat, 28 Nov 2009 08:58:14 +0000 (08:58 +0000)]
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
Kovarththanan Rajaratnam [Sat, 28 Nov 2009 07:52:34 +0000 (07:52 +0000)]
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
Kovarththanan Rajaratnam [Sat, 28 Nov 2009 06:07:30 +0000 (06:07 +0000)]
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
Sean Hunt [Sat, 28 Nov 2009 04:44:28 +0000 (04:44 +0000)]
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
Eli Friedman [Sat, 28 Nov 2009 03:35:45 +0000 (03:35 +0000)]
Tests now pass with the assertion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90026
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 28 Nov 2009 03:31:34 +0000 (03:31 +0000)]
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
Anders Carlsson [Sat, 28 Nov 2009 03:03:52 +0000 (03:03 +0000)]
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
Anders Carlsson [Sat, 28 Nov 2009 00:50:23 +0000 (00:50 +0000)]
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
Anders Carlsson [Fri, 27 Nov 2009 22:21:51 +0000 (22:21 +0000)]
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
Anders Carlsson [Fri, 27 Nov 2009 22:14:40 +0000 (22:14 +0000)]
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
Anders Carlsson [Fri, 27 Nov 2009 22:05:05 +0000 (22:05 +0000)]
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
Anders Carlsson [Fri, 27 Nov 2009 20:47:55 +0000 (20:47 +0000)]
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
Daniel Dunbar [Fri, 27 Nov 2009 08:26:07 +0000 (08:26 +0000)]
Fix typo, thanks Sebastian!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89999
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 27 Nov 2009 08:26:00 +0000 (08:26 +0000)]
Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89998
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 27 Nov 2009 04:56:40 +0000 (04:56 +0000)]
Some member pointer casting tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89989
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 27 Nov 2009 04:46:20 +0000 (04:46 +0000)]
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
Eli Friedman [Fri, 27 Nov 2009 04:41:50 +0000 (04:41 +0000)]
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
Eli Friedman [Fri, 27 Nov 2009 02:07:44 +0000 (02:07 +0000)]
Cleanup for ScalarExprEmitter::EmitCastExpr; no functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89986
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 27 Nov 2009 01:42:12 +0000 (01:42 +0000)]
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
Anders Carlsson [Fri, 27 Nov 2009 01:26:58 +0000 (01:26 +0000)]
Fix thinko.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89983
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 26 Nov 2009 21:25:09 +0000 (21:25 +0000)]
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
Anders Carlsson [Thu, 26 Nov 2009 20:50:40 +0000 (20:50 +0000)]
Correctly find overridden destructors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89966
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 26 Nov 2009 19:54:33 +0000 (19:54 +0000)]
Lazily create the __cxa_pure_virtual reference.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89965
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 26 Nov 2009 19:32:45 +0000 (19:32 +0000)]
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
Gabor Greif [Thu, 26 Nov 2009 15:18:50 +0000 (15:18 +0000)]
typo
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89949
91177308 -0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Thu, 26 Nov 2009 14:35:28 +0000 (14:35 +0000)]
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
Benjamin Kramer [Thu, 26 Nov 2009 13:09:03 +0000 (13:09 +0000)]
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
Daniel Dunbar [Thu, 26 Nov 2009 09:57:25 +0000 (09:57 +0000)]
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
Eli Friedman [Thu, 26 Nov 2009 07:48:44 +0000 (07:48 +0000)]
Remove unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89945
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 26 Nov 2009 07:45:48 +0000 (07:45 +0000)]
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
Eli Friedman [Thu, 26 Nov 2009 07:40:08 +0000 (07:40 +0000)]
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
Ted Kremenek [Thu, 26 Nov 2009 07:14:50 +0000 (07:14 +0000)]
Improve diagnostics in ReturnStackAddressChecker for returning a stack-allocated block. Implements the rest of <rdar://problem/
7387385 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89940
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 26 Nov 2009 06:55:36 +0000 (06:55 +0000)]
Add test case that shows that dead stores checking now works in the presence of blocks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89939
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 26 Nov 2009 06:08:14 +0000 (06:08 +0000)]
Implement IRGen for MemberExpr referring to static member function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89938
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 26 Nov 2009 05:09:00 +0000 (05:09 +0000)]
Don't run the LLVM Code tests by default.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89937
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 26 Nov 2009 05:08:53 +0000 (05:08 +0000)]
Add -Werror for Clang and LLVM on Clang (headers) syntax tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89936
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 26 Nov 2009 03:25:13 +0000 (03:25 +0000)]
Add a Thunk struct to the vtable builder.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89935
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 26 Nov 2009 03:22:21 +0000 (03:22 +0000)]
Use the more general Evaluate infrastructure for folding constant DeclRefs
instead of checking explicitly for an EnumConstantDecl. This folds references
to constant integer VarDecls, which has two benefits:
1. Slightly smaller emitted code from emitting a constant instead of a load,
and skipping emitting some constant globals.
2. Some code forgets to define static constant member variables; emitting a
load instead of the value in that case leads to a link error. (Such programs
are technically not well-formed, but in practice build with g++.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89934
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 26 Nov 2009 03:09:37 +0000 (03:09 +0000)]
Add a CovariantThunkAdjustment struct that represents the adjustments needed for a covariant thunk.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89933
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 26 Nov 2009 03:04:01 +0000 (03:04 +0000)]
Slight tweak to the algorithm for getLinkage().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89932
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 26 Nov 2009 02:52:12 +0000 (02:52 +0000)]
Use new getLinkage() method to correctly compute whether a variable has
internal linkage. Fixes PR5433.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89931
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 26 Nov 2009 02:49:32 +0000 (02:49 +0000)]
Move the mangler into the CodeGen namespace. Change mangleThunk to take a ThunkAdjustment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89930
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 26 Nov 2009 02:38:19 +0000 (02:38 +0000)]
Add a PostVisitBlockExpr() method to RetainReleaseChecker to query for
the set of variables "captured" by a block. Until the analysis gets
more sophisticated, for now we stop the retain count tracking of any
objects (transitively) referenced by these variables.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89929
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 26 Nov 2009 02:35:42 +0000 (02:35 +0000)]
Teach RegionStoreManager::RemoveDeadBindings() about BlockDataRegions. Any VarRegion for a "captured" variable should also be considered live.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89928
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 26 Nov 2009 02:34:36 +0000 (02:34 +0000)]
Add iterators to BlockDataRegion that allow clients to iterate over the VarRegions for "captured" variables for a block.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89927
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 26 Nov 2009 02:32:19 +0000 (02:32 +0000)]
Added batch versions of GRState::scanReachableSymbols() so that clients can scan a collection of SVals or MemRegions all at once.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89926
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 26 Nov 2009 02:32:05 +0000 (02:32 +0000)]
Add a ThunkAdjustment struct which holds a non-virtual and a virtual adjustment offset. Start using it. General cleanup in Mangle.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89925
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 26 Nov 2009 02:31:33 +0000 (02:31 +0000)]
Enhance LiveVariables to understand that blocks can extend the liveness of a variable by "capturing" them in a BlockExpr.
This required two changes:
1) Added 'getReferencedgetReferencedBlockVars()' to AnalysisContext so
that clients can iterate over the "captured" variables in a block.
2) Modified LiveVariables to take an AnalysisContext& in its
constructor and to call getReferencedgetReferencedBlockVars() when it
processes a BlockExpr*.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89924
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 26 Nov 2009 02:28:53 +0000 (02:28 +0000)]
Add C++ tests to try to parse and compile the LLVM libraries
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89923
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 26 Nov 2009 02:14:31 +0000 (02:14 +0000)]
Factor out a LangStandard class and coalesce the information about the standards into LangStandards.def
- I'd appreciate another pair of eyeballs to double check this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89919
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 26 Nov 2009 02:14:16 +0000 (02:14 +0000)]
Fix thinko (-fno-builtin != -nobuiltininc).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89918
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 26 Nov 2009 02:14:07 +0000 (02:14 +0000)]
Add clang -cc1 parsing for preprocessor options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89917
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 26 Nov 2009 02:13:54 +0000 (02:13 +0000)]
Add clang -cc1 parsing for header search options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89916
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 26 Nov 2009 00:44:06 +0000 (00:44 +0000)]
Refactor our handling of expression evaluation contexts, so that Sema
maintains a stack of evaluation contexts rather than having the parser
do it. This change made it simpler to track in which contexts
temporaries were created, so that we could...
"Forget" about temporaries created within unevaluated contexts, so
that we don't build a CXXExprWithTemporaries and, therefore, destroy
the integral-constness of our expressions. Fixes PR5609.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89908
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 25 Nov 2009 23:58:21 +0000 (23:58 +0000)]
Add missing case in switch statement.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89903
91177308 -0d34-0410-b5e6-
96231b3b80d8