]> granicus.if.org Git - clang/log
clang
14 years agoMangler: Sketch mangling for TemplateArgument::Declaration kind.
Daniel Dunbar [Sat, 21 Nov 2009 09:17:15 +0000 (09:17 +0000)]
Mangler: Sketch mangling for TemplateArgument::Declaration kind.
 - Several important FIXMEs related to whether arguments are expressions or external names, and the mangling of extern "C" names (c.f., PR5522).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89556 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMangler: Lift shouldMangleDeclName predicate out of CXXNameMangler::mangle.
Daniel Dunbar [Sat, 21 Nov 2009 09:14:52 +0000 (09:14 +0000)]
Mangler: Lift shouldMangleDeclName predicate out of CXXNameMangler::mangle.
 - Sometimes we have to mangle things we wouldn't normally (e.g., because they appear in a template expression).

 - This also tidies up the predicate to be more obvious what is getting mangled.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89555 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMangler: Strengthen invariants, MangleContext::mangleName should only be called on...
Daniel Dunbar [Sat, 21 Nov 2009 09:14:44 +0000 (09:14 +0000)]
Mangler: Strengthen invariants, MangleContext::mangleName should only be called on var or function decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89554 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMangler: Inline a bunch of functions into their sole caller, not that I don't love...
Daniel Dunbar [Sat, 21 Nov 2009 09:12:13 +0000 (09:12 +0000)]
Mangler: Inline a bunch of functions into their sole caller, not that I don't love typing for typings sake, but...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89553 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDeclPrinter: Indent access specifiers.
Daniel Dunbar [Sat, 21 Nov 2009 09:12:06 +0000 (09:12 +0000)]
DeclPrinter: Indent access specifiers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89552 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove dead variable.
Daniel Dunbar [Sat, 21 Nov 2009 09:11:59 +0000 (09:11 +0000)]
Remove dead variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89551 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMangler: Split isStdNamespace for when the caller already has a NamespaceDecl.
Daniel Dunbar [Sat, 21 Nov 2009 09:11:45 +0000 (09:11 +0000)]
Mangler: Split isStdNamespace for when the caller already has a NamespaceDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89550 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIRgen: Eliminate CXXNameMangler::mangleCXX{C,D}tor.
Daniel Dunbar [Sat, 21 Nov 2009 09:06:31 +0000 (09:06 +0000)]
IRgen: Eliminate CXXNameMangler::mangleCXX{C,D}tor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89549 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIRgen: Switch the C++ mangler interfaces to take the SmallVector to write into,
Daniel Dunbar [Sat, 21 Nov 2009 09:06:22 +0000 (09:06 +0000)]
IRgen: Switch the C++ mangler interfaces to take the SmallVector to write into,
instead of requiring clients to make a raw_svector_ostream, which is just an
implementation detail.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89548 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSink free mangle* methods into MangleContext.
Daniel Dunbar [Sat, 21 Nov 2009 09:06:10 +0000 (09:06 +0000)]
Sink free mangle* methods into MangleContext.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89547 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd 1+2 consts.
Daniel Dunbar [Sat, 21 Nov 2009 09:05:59 +0000 (09:05 +0000)]
Add 1+2 consts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89546 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDelete trailing space.
Daniel Dunbar [Sat, 21 Nov 2009 09:05:47 +0000 (09:05 +0000)]
Delete trailing space.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89545 91177308-0d34-0410-b5e6-96231b3b80d8

14 years ago"Incremental" progress on using expressions, by which I mean totally ripping
John McCall [Sat, 21 Nov 2009 08:51:07 +0000 (08:51 +0000)]
"Incremental" progress on using expressions, by which I mean totally ripping
into pretty much everything about overload resolution in order to wean
BuildDeclarationNameExpr off LookupResult::getAsSingleDecl().  Replace
UnresolvedFunctionNameExpr with UnresolvedLookupExpr, which generalizes the
idea of a non-member lookup that we haven't totally resolved yet, whether by
overloading, argument-dependent lookup, or (eventually) the presence of
a function template in the lookup results.

Incidentally fixes a problem with argument-dependent lookup where we were
still performing ADL even when the lookup results contained something from
a block scope.

Incidentally improves a diagnostic when using an ObjC ivar from a class method.
This just fell out from rewriting BuildDeclarationNameExpr's interaction with
lookup, and I'm too apathetic to break it out.

The only remaining uses of OverloadedFunctionDecl that I know of are in
TemplateName and MemberExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89544 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdded rudimentary C++0x attribute support.
Sean Hunt [Sat, 21 Nov 2009 08:43:09 +0000 (08:43 +0000)]
Added rudimentary C++0x attribute support.
The following attributes are currently supported in C++0x attribute
lists (and in GNU ones as well):
 - align() - semantics believed to be conformant to n3000, except for
   redeclarations and what entities it may apply to
 - final - semantics believed to be conformant to CWG issue 817's proposed
   wording, except for redeclarations
 - noreturn - semantics believed to be conformant to n3000, except for
   redeclarations
 - carries_dependency - currently ignored (this is an optimization hint)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89543 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd RegionStore test case that shows that floating point values are also implicitly...
Ted Kremenek [Sat, 21 Nov 2009 02:52:12 +0000 (02:52 +0000)]
Add RegionStore test case that shows that floating point values are also implicitly tracked for undefined values.  (test case for <rdar://problem/6811085>).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89538 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix refacto, gcc's cc1 needs to see --output-pch=, which is not just an alias
Daniel Dunbar [Sat, 21 Nov 2009 02:31:29 +0000 (02:31 +0000)]
Fix refacto, gcc's cc1 needs to see --output-pch=, which is not just an alias
for -output-pch=.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89534 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd another test case to show the precision of RegionStore over
Ted Kremenek [Sat, 21 Nov 2009 02:17:47 +0000 (02:17 +0000)]
Add another test case to show the precision of RegionStore over
BasicStore.  In this example, BasicStore would lose information about
the pointer in path after '*path++', causing the analyzer to falsely
flag a null dereference.  This addresses <rdar://problem/7191542>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89533 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImplement C++ [temp.param]p2 correctly, looking ahead when we see a
Douglas Gregor [Sat, 21 Nov 2009 02:07:55 +0000 (02:07 +0000)]
Implement C++ [temp.param]p2 correctly, looking ahead when we see a
"typename" parameter to distinguish between non-type and type template
parameters. Fixes the actual bug in PR5559.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89532 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRestructure DereferenceChecker slightly to handle caching out when we would report...
Ted Kremenek [Sat, 21 Nov 2009 01:50:48 +0000 (01:50 +0000)]
Restructure DereferenceChecker slightly to handle caching out when we would report a null dereference more than once.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89526 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPull BadCallChecker int UndefinedArgChecker, and have UndefinedArgChecker also handle...
Ted Kremenek [Sat, 21 Nov 2009 01:25:37 +0000 (01:25 +0000)]
Pull BadCallChecker int UndefinedArgChecker, and have UndefinedArgChecker also handled undefined receivers in message expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89524 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd SigAtomicType to TargetInfo, Needed for MSP and PIC Targets, Credit to Ken Dyck.
Edward O'Callaghan [Sat, 21 Nov 2009 00:49:54 +0000 (00:49 +0000)]
Add SigAtomicType to TargetInfo, Needed for MSP and PIC Targets, Credit to Ken Dyck.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89520 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMore checker refactoring. Passing undefined values in a message expression is now...
Ted Kremenek [Sat, 21 Nov 2009 00:49:41 +0000 (00:49 +0000)]
More checker refactoring.  Passing undefined values in a message expression is now handled by UndefinedArgChecker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89519 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevised Win32 include path to search highest version in registry, plus platform SDK...
John Thompson [Sat, 21 Nov 2009 00:15:52 +0000 (00:15 +0000)]
Revised Win32 include path to search highest version in registry, plus platform SDK path

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89517 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoConvert test to FileCheck.
Daniel Dunbar [Fri, 20 Nov 2009 23:46:56 +0000 (23:46 +0000)]
Convert test to FileCheck.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89514 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCheckpoint current work. WIP.
Mike Stump [Fri, 20 Nov 2009 23:44:51 +0000 (23:44 +0000)]
Checkpoint current work.  WIP.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89513 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCope with extraneous "template" keyword when providing an out-of-line
Douglas Gregor [Fri, 20 Nov 2009 23:39:24 +0000 (23:39 +0000)]
Cope with extraneous "template" keyword when providing an out-of-line
definition of a member template (or a member thereof). Fixes PR5566.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89512 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDriver: Add clang -cc1 dependency output options parsing.
Daniel Dunbar [Fri, 20 Nov 2009 23:28:07 +0000 (23:28 +0000)]
Driver: Add clang -cc1 dependency output options parsing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89508 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSwitch CompilerInvocation::CreateFromArgs to take const char** arguments until Driver...
Daniel Dunbar [Fri, 20 Nov 2009 22:47:55 +0000 (22:47 +0000)]
Switch CompilerInvocation::CreateFromArgs to take const char** arguments until Driver itself switches to StringRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89503 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix refactoro, clang-cc wasn't properly reporting errors when opening an output file...
Daniel Dunbar [Fri, 20 Nov 2009 22:32:38 +0000 (22:32 +0000)]
Fix refactoro, clang-cc wasn't properly reporting errors when opening an output file failed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89502 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDriver: Use '-target-abi' 'FOO' instead of '-target-abi=FOO'.
Daniel Dunbar [Fri, 20 Nov 2009 22:32:30 +0000 (22:32 +0000)]
Driver: Use '-target-abi' 'FOO' instead of '-target-abi=FOO'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89501 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUpdate for palign intrinsic fix.
Daniel Dunbar [Fri, 20 Nov 2009 22:21:59 +0000 (22:21 +0000)]
Update for palign intrinsic fix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89499 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPass '-mcpu' 'FOO' instead of '-mcpu=FOO'.
Daniel Dunbar [Fri, 20 Nov 2009 22:21:52 +0000 (22:21 +0000)]
Pass '-mcpu' 'FOO' instead of '-mcpu=FOO'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89498 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoStandardize Driver translation to call clang-cc using '-foo' form instead of '--foo'.
Daniel Dunbar [Fri, 20 Nov 2009 22:21:36 +0000 (22:21 +0000)]
Standardize Driver translation to call clang-cc using '-foo' form instead of '--foo'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89497 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoA previous commit fixed PR5519; here's the test case.
Douglas Gregor [Fri, 20 Nov 2009 22:05:53 +0000 (22:05 +0000)]
A previous commit fixed PR5519; here's the test case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89494 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImplement C++ [basic.lookup.classref]p3, which states how the type
Douglas Gregor [Fri, 20 Nov 2009 22:03:38 +0000 (22:03 +0000)]
Implement C++ [basic.lookup.classref]p3, which states how the type
name 'T' is looked up in the expression

  t.~T()

Previously, we weren't looking into the type of "t", and therefore
would fail when T actually referred to an injected-class-name. Fixes
PR5530.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89493 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUpdate C++ status
Douglas Gregor [Fri, 20 Nov 2009 22:00:06 +0000 (22:00 +0000)]
Update C++ status

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89492 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWhen checking the base object of a member access expression (b.foo,
Douglas Gregor [Fri, 20 Nov 2009 19:58:21 +0000 (19:58 +0000)]
When checking the base object of a member access expression (b.foo,
b->foo), don't look through pointers unless we have an -> operator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89480 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTeach FixOverloadedFunctionReference to build new expression ASTs rather
Douglas Gregor [Fri, 20 Nov 2009 19:42:02 +0000 (19:42 +0000)]
Teach FixOverloadedFunctionReference to build new expression ASTs rather
than tweaking existing ASTs, since we were (*gasp*) stomping on ASTs
within templates. I'm glad we found this little stick of TNT early...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89475 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd testcases for recent checkins.
Mike Stump [Fri, 20 Nov 2009 18:51:28 +0000 (18:51 +0000)]
Add testcases for recent checkins.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89469 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix lifetime of conditional temporaries. Patch by Victor Zverovich!
Anders Carlsson [Fri, 20 Nov 2009 17:27:56 +0000 (17:27 +0000)]
Fix lifetime of conditional temporaries. Patch by Victor Zverovich!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89467 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix some codegen tests to include positive checks.
Daniel Dunbar [Fri, 20 Nov 2009 17:23:39 +0000 (17:23 +0000)]
Fix some codegen tests to include positive checks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89465 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd clang -cc1 parsing of CodeGenOptions.
Daniel Dunbar [Fri, 20 Nov 2009 17:23:30 +0000 (17:23 +0000)]
Add clang -cc1 parsing of CodeGenOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89464 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoclang-cc: Lift setForcedLangOptions out of options initialization.
Daniel Dunbar [Fri, 20 Nov 2009 16:55:31 +0000 (16:55 +0000)]
clang-cc: Lift setForcedLangOptions out of options initialization.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89462 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAvoid unwanted expansion in macros that paste together INT<n>_C(v) and
Ken Dyck [Fri, 20 Nov 2009 16:49:10 +0000 (16:49 +0000)]
Avoid unwanted expansion in macros that paste together INT<n>_C(v) and
UINT<n>_C(v) macros.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89461 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAvoid unwanted expansion in macros that paste together INT<n>_MIN, INT<n>_MAX,
Ken Dyck [Fri, 20 Nov 2009 16:44:38 +0000 (16:44 +0000)]
Avoid unwanted expansion in macros that paste together INT<n>_MIN, INT<n>_MAX,
and UINT<n>_MAX defintions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89460 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAvoid unwanted macro expansion in macros that paste together int<n>_t and
Ken Dyck [Fri, 20 Nov 2009 16:37:35 +0000 (16:37 +0000)]
Avoid unwanted macro expansion in macros that paste together int<n>_t and
uint<n>_t definitions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89459 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFixed crash when using undefined protocols (GNU runtime).
David Chisnall [Fri, 20 Nov 2009 14:50:59 +0000 (14:50 +0000)]
Fixed crash when using undefined protocols (GNU runtime).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89457 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a workaround to silence a bogus g++-4.4 -pedantic warning.
Benjamin Kramer [Fri, 20 Nov 2009 11:49:06 +0000 (11:49 +0000)]
Add a workaround to silence a bogus g++-4.4 -pedantic warning.

driver.cpp:211: warning: ISO C++ forbids zero-size array 'argv'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89455 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix typo GCC 4.3 warned about.
Benjamin Kramer [Fri, 20 Nov 2009 10:03:00 +0000 (10:03 +0000)]
Fix typo GCC 4.3 warned about.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89453 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agono need to cast.
Zhongxing Xu [Fri, 20 Nov 2009 06:14:56 +0000 (06:14 +0000)]
no need to cast.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89451 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix a couple minor memory leaks.
Eli Friedman [Fri, 20 Nov 2009 05:53:06 +0000 (05:53 +0000)]
Fix a couple minor memory leaks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89450 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd simple static analyzer checker to check for sending 'release', 'retain', etc...
Ted Kremenek [Fri, 20 Nov 2009 05:27:05 +0000 (05:27 +0000)]
Add simple static analyzer checker to check for sending 'release', 'retain', etc. directly to a class.  Fixes <rdar://problem/7252064>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89449 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUnused ivar checker: ivars referenced by lexically nested functions should not be...
Ted Kremenek [Fri, 20 Nov 2009 04:31:57 +0000 (04:31 +0000)]
Unused ivar checker: ivars referenced by lexically nested functions should not be flagged as unused.  Fixes <rdar://problem/7254495>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89448 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoNo need to pass the state argument explicitly.
Zhongxing Xu [Fri, 20 Nov 2009 04:09:56 +0000 (04:09 +0000)]
No need to pass the state argument explicitly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89447 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert r89437 and add a comment.
Zhongxing Xu [Fri, 20 Nov 2009 03:50:46 +0000 (03:50 +0000)]
Revert r89437 and add a comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89446 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImplement throw d, where d is a class type that requires copy
Mike Stump [Fri, 20 Nov 2009 02:31:07 +0000 (02:31 +0000)]
Implement throw d, where d is a class type that requires copy
construction.  WIP.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89442 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't build an explicit conversion to a reference type
Douglas Gregor [Fri, 20 Nov 2009 02:31:03 +0000 (02:31 +0000)]
Don't build an explicit conversion to a reference type

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89441 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoHandle throw d, where d is a class type but only has a trivial copy
Mike Stump [Fri, 20 Nov 2009 01:57:39 +0000 (01:57 +0000)]
Handle throw d, where d is a class type but only has a trivial copy
constructor.  WIP.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89438 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIt's unnecessary to check for unknown at this point.
Zhongxing Xu [Fri, 20 Nov 2009 01:56:48 +0000 (01:56 +0000)]
It's unnecessary to check for unknown at this point.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89437 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDriver: Add parsing for TargetOptions to CompilerInvocation::CreateFromArgs.
Daniel Dunbar [Fri, 20 Nov 2009 01:46:44 +0000 (01:46 +0000)]
Driver: Add parsing for TargetOptions to CompilerInvocation::CreateFromArgs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89435 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIgnore -Wstrict-overflow={3,4,5} for now.
Daniel Dunbar [Fri, 20 Nov 2009 01:31:27 +0000 (01:31 +0000)]
Ignore -Wstrict-overflow={3,4,5} for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89433 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoReally fix test case.
Ted Kremenek [Fri, 20 Nov 2009 01:20:12 +0000 (01:20 +0000)]
Really fix test case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89430 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix test case.
Ted Kremenek [Fri, 20 Nov 2009 01:19:22 +0000 (01:19 +0000)]
Fix test case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89429 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWhen we have a non-dependent expression such as
Douglas Gregor [Fri, 20 Nov 2009 00:59:20 +0000 (00:59 +0000)]
When we have a non-dependent expression such as

  A::f

that occurs within a non-static member function with a type-dependent
"this", don't consider this to be a case for introduction of an
implicit "(*this)." to refer to a specific member function unless we
know (at template definition time) that A is a base class of *this.

There is some disagreement here between GCC, EDG, and Clang about the
handling of this case. I believe that Clang now has the correct,
literal interpretation of the standard, but have asked for
clarification (c++std-core-15483).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89425 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd suport for throw;. WIP.
Mike Stump [Fri, 20 Nov 2009 00:56:31 +0000 (00:56 +0000)]
Add suport for throw;.  WIP.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89424 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix rtti generation for throws. WIP.
Mike Stump [Fri, 20 Nov 2009 00:43:57 +0000 (00:43 +0000)]
Fix rtti generation for throws.  WIP.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89420 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSimplify rtti building code a little. Prep for reuse for throw rtti
Mike Stump [Fri, 20 Nov 2009 00:31:50 +0000 (00:31 +0000)]
Simplify rtti building code a little.  Prep for reuse for throw rtti
generation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89416 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix null dereference in NSAutoreleasePoolChecker when analyzing messages sent to...
Ted Kremenek [Fri, 20 Nov 2009 00:12:36 +0000 (00:12 +0000)]
Fix null dereference in NSAutoreleasePoolChecker when analyzing messages sent to blocks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89413 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFixup key function calculations.
Mike Stump [Fri, 20 Nov 2009 00:02:19 +0000 (00:02 +0000)]
Fixup key function calculations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89412 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDeduce a ConstantArrayType from a value-dependent initializer list
Douglas Gregor [Thu, 19 Nov 2009 23:25:22 +0000 (23:25 +0000)]
Deduce a ConstantArrayType from a value-dependent initializer list
rather than punting to a DependentSizedArrayType, tightening up our
type checking for template definitions. Thanks, John!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89407 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDraw a brighter line between "unresolved" expressions, where we have done the
John McCall [Thu, 19 Nov 2009 22:55:06 +0000 (22:55 +0000)]
Draw a brighter line between "unresolved" expressions, where we have done the
appropriate lookup and simply can't resolve the referrent yet, and
"dependent scope" expressions, where we can't do the lookup yet because the
entity we need to look into is a dependent type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89402 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't issue spurious diagnostic with Obj-C fast enumeration.
Fariborz Jahanian [Thu, 19 Nov 2009 22:12:37 +0000 (22:12 +0000)]
Don't issue spurious diagnostic with Obj-C fast enumeration.
(radar 7409165).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89400 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIgnore build output in include/clang/Driver
Sebastian Redl [Thu, 19 Nov 2009 22:01:32 +0000 (22:01 +0000)]
Ignore build output in include/clang/Driver

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89399 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix some default in the option classes, and some CompilerInvocation argification
Daniel Dunbar [Thu, 19 Nov 2009 20:54:59 +0000 (20:54 +0000)]
Fix some default in the option classes, and some CompilerInvocation argification
errors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89388 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd missing dependency on TableGen.
Daniel Dunbar [Thu, 19 Nov 2009 20:54:45 +0000 (20:54 +0000)]
Add missing dependency on TableGen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89387 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFixup address point computations. WIP.
Mike Stump [Thu, 19 Nov 2009 20:52:19 +0000 (20:52 +0000)]
Fixup address point computations.  WIP.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89386 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix crash when using --analyzer-store=region when handling initializers with nested...
Ted Kremenek [Thu, 19 Nov 2009 20:20:24 +0000 (20:20 +0000)]
Fix crash when using --analyzer-store=region when handling initializers with nested arrays/structs whose values are not explicitly specified.  Fixes <rdar://problem/7403269>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89384 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove printf statement.
Ted Kremenek [Thu, 19 Nov 2009 20:01:53 +0000 (20:01 +0000)]
Remove printf statement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89383 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix 80 col. violation.
Ted Kremenek [Thu, 19 Nov 2009 19:59:42 +0000 (19:59 +0000)]
Fix 80 col. violation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89382 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoOnly fetch the ASTContext object within the assertion.
Ted Kremenek [Thu, 19 Nov 2009 19:04:08 +0000 (19:04 +0000)]
Only fetch the ASTContext object within the assertion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89375 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSilence -Asserts warning.
Daniel Dunbar [Thu, 19 Nov 2009 18:53:25 +0000 (18:53 +0000)]
Silence -Asserts warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89373 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDriver: Move INPUT and UNKNOWN sentinel options into the OptParser.td file.
Daniel Dunbar [Thu, 19 Nov 2009 18:47:17 +0000 (18:47 +0000)]
Driver: Move INPUT and UNKNOWN sentinel options into the OptParser.td file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89371 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPatch to implement new-operators with default args.
Fariborz Jahanian [Thu, 19 Nov 2009 18:39:40 +0000 (18:39 +0000)]
Patch to implement new-operators with default args.
Fixes pr5547.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89370 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDriver: Add Sentinel flag to option kinds.
Daniel Dunbar [Thu, 19 Nov 2009 18:09:06 +0000 (18:09 +0000)]
Driver: Add Sentinel flag to option kinds.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89367 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCope with an amusingly little anomaly with dependent types and
Douglas Gregor [Thu, 19 Nov 2009 18:03:26 +0000 (18:03 +0000)]
Cope with an amusingly little anomaly with dependent types and
incomplete array initialization, where we have the following in a
template:

  int a[] = { 1, 2, something-value-dependent };
  // ...
  sizeof(a);

The type of "a" appears to be a non-dependent IncompleteArrayType, but
treating it as such makes the sizeof(a) fail at template definition
time. We now correctly handle this by morphing the IncompleteArrayType
into a DependentSizedArrayType with a NULL expression, indicating that
its size has no corresponding expression (and, therefore, the type is
distinct from others).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89366 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdded preliminary support step for PS3
John Thompson [Thu, 19 Nov 2009 17:18:50 +0000 (17:18 +0000)]
Added preliminary support step for PS3

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89362 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTry yet again to de-bork CMake Windows build w.r.t. clang++
Douglas Gregor [Thu, 19 Nov 2009 16:42:34 +0000 (16:42 +0000)]
Try yet again to de-bork CMake Windows build w.r.t. clang++

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89361 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDefine WCHAR_MIN and WCHAR_MAX in terms of __WCHAR_WIDTH__ for consistency with
Ken Dyck [Thu, 19 Nov 2009 15:53:08 +0000 (15:53 +0000)]
Define WCHAR_MIN and WCHAR_MAX in terms of __WCHAR_WIDTH__ for consistency with
other limit macros.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89355 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDefine __WCHAR_WIDTH__ for use in stdint.h.
Ken Dyck [Thu, 19 Nov 2009 15:47:58 +0000 (15:47 +0000)]
Define __WCHAR_WIDTH__ for use in stdint.h.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89353 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoignore Output folders
Nuno Lopes [Thu, 19 Nov 2009 14:57:24 +0000 (14:57 +0000)]
ignore Output folders

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89351 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoParameterize WINT_MIN and WINT_MAX with __WINT_WIDTH__ to support arbitrary
Ken Dyck [Thu, 19 Nov 2009 14:35:19 +0000 (14:35 +0000)]
Parameterize WINT_MIN and WINT_MAX with __WINT_WIDTH__ to support arbitrary
widths. This corrects the values of these definitions for MSP430 and PIC16.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89350 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd __WINT_WIDTH__ to paramaterize the limits of WINT_MIN and WINT_MAX in
Ken Dyck [Thu, 19 Nov 2009 14:16:57 +0000 (14:16 +0000)]
Add __WINT_WIDTH__ to paramaterize the limits of WINT_MIN and WINT_MAX in
stdint.h.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89348 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoConstruct definition of SIZE_MAX from __SIZE_WIDTH__ to support targets of
Ken Dyck [Thu, 19 Nov 2009 14:03:24 +0000 (14:03 +0000)]
Construct definition of SIZE_MAX from __SIZE_WIDTH__ to support targets of
arbitrary widths.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89347 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd __SIZE_WIDTH__ to eventually replace __SIZE_TYPE__ in stdint.h.
Ken Dyck [Thu, 19 Nov 2009 13:42:09 +0000 (13:42 +0000)]
Add __SIZE_WIDTH__ to eventually replace __SIZE_TYPE__ in stdint.h.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89346 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRestore __INTMAX_TYPE__, __UINTMAX_TYPE__, __PTRDIFF_TYPE__, and
Ken Dyck [Thu, 19 Nov 2009 13:18:59 +0000 (13:18 +0000)]
Restore __INTMAX_TYPE__, __UINTMAX_TYPE__, __PTRDIFF_TYPE__, and
__INTPTR_TYPE__ as the last is used in the test/CodeGen/const-init.c and all
could potentially be in use in the wild. My apologies.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89345 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove __PTRDIFF_TYPE__ as it is no longer needed by stdint.h. It has been
Ken Dyck [Thu, 19 Nov 2009 12:37:14 +0000 (12:37 +0000)]
Remove __PTRDIFF_TYPE__ as it is no longer needed by stdint.h. It has been
replaced with __PTRDIFF_WIDTH__.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89344 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoConstruct the macro body of PTRDIFF_MAX and PTRDIFF_MIN from __PTRDIFF_WIDTH__.
Ken Dyck [Thu, 19 Nov 2009 12:33:01 +0000 (12:33 +0000)]
Construct the macro body of PTRDIFF_MAX and PTRDIFF_MIN from __PTRDIFF_WIDTH__.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89343 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd __PTRDIFF_WIDTH__ macro to eventually replace __PTRDIFF_TYPE__ in stdint.h.
Ken Dyck [Thu, 19 Nov 2009 12:21:52 +0000 (12:21 +0000)]
Add __PTRDIFF_WIDTH__ macro to eventually replace __PTRDIFF_TYPE__ in stdint.h.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89342 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove __INTPTR_TYPE__ as it is no longer needed by stdint.h, which uses
Ken Dyck [Thu, 19 Nov 2009 12:15:31 +0000 (12:15 +0000)]
Remove __INTPTR_TYPE__ as it is no longer needed by stdint.h, which uses
__INTPTR_WIDTH__ instead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89340 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTry to fix CMake clang++ creation on Windows
Douglas Gregor [Thu, 19 Nov 2009 07:59:29 +0000 (07:59 +0000)]
Try to fix CMake clang++ creation on Windows

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89336 91177308-0d34-0410-b5e6-96231b3b80d8