]> granicus.if.org Git - clang/log
clang
15 years agomore printf attribute on block declaration and
Fariborz Jahanian [Mon, 18 May 2009 21:05:18 +0000 (21:05 +0000)]
more printf attribute on block declaration and
checking when block is envoked. In progress.

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

15 years agoDebug info: Initialize runtime language field correctly for Objective-C
Daniel Dunbar [Mon, 18 May 2009 20:51:58 +0000 (20:51 +0000)]
Debug info: Initialize runtime language field correctly for Objective-C
interface types.

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

15 years agoTemplate instantiation for C++ try/catch statements.
Douglas Gregor [Mon, 18 May 2009 20:51:54 +0000 (20:51 +0000)]
Template instantiation for C++ try/catch statements.

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

15 years agoSince we miscompile many cases when declaring a variable with a reference type, make...
Anders Carlsson [Mon, 18 May 2009 19:55:29 +0000 (19:55 +0000)]
Since we miscompile many cases when declaring a variable with a reference type, make them unsupported for now.

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

15 years agoRemove an unused builtin.
Anders Carlsson [Mon, 18 May 2009 19:25:54 +0000 (19:25 +0000)]
Remove an unused builtin.

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

15 years agoAdd 'cmp' SSE builtins and get rid of a bunch of other builtins.
Anders Carlsson [Mon, 18 May 2009 19:16:46 +0000 (19:16 +0000)]
Add 'cmp' SSE builtins and get rid of a bunch of other builtins.

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

15 years agoInclude StmtNodes.def to declare Visit methods for all of the known
Douglas Gregor [Mon, 18 May 2009 19:08:47 +0000 (19:08 +0000)]
Include StmtNodes.def to declare Visit methods for all of the known
kinds of statements (in the instantiation logic). No functionality
change, but now we'll get linker errors if we add a statement but
forget to introduce its instantiation logic.

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

15 years agoSimplify struct/class tag mismatch warning, per Sebastian's suggestion
Douglas Gregor [Mon, 18 May 2009 18:46:22 +0000 (18:46 +0000)]
Simplify struct/class tag mismatch warning, per Sebastian's suggestion

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

15 years agoSimplify tests now that GNU runtime supports exception handling.
Daniel Dunbar [Mon, 18 May 2009 17:43:32 +0000 (17:43 +0000)]
Simplify tests now that GNU runtime supports exception handling.

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

15 years agoMinor tweak to support format attribute on blocks. No change in functionality.
Fariborz Jahanian [Mon, 18 May 2009 17:39:25 +0000 (17:39 +0000)]
Minor tweak to support format attribute on blocks. No change in functionality.

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

15 years agoAvoid potential out-of-bounds access in SourceManager::getLineNumber.
Daniel Dunbar [Mon, 18 May 2009 17:30:52 +0000 (17:30 +0000)]
Avoid potential out-of-bounds access in SourceManager::getLineNumber.
 - Chris, please see added FIXMEs.

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

15 years agoOops, dropped a -verify
Douglas Gregor [Mon, 18 May 2009 17:02:28 +0000 (17:02 +0000)]
Oops, dropped a -verify

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

15 years agoWhen instantiating the definition of a member function of a class
Douglas Gregor [Mon, 18 May 2009 17:01:57 +0000 (17:01 +0000)]
When instantiating the definition of a member function of a class
template, introduce that member function into the template
instantiation stack. Also, add diagnostics showing the member function
within the instantiation stack and clean up the qualified-name
printing so that we get something like:

  note: in instantiation of member function 'Switch1<int, 2, 2>::f'
  requested here

in the template instantiation backtrace.

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

15 years agoImprove test case a wee bit
Daniel Dunbar [Mon, 18 May 2009 16:49:49 +0000 (16:49 +0000)]
Improve test case a wee bit

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

15 years agoSilence a Release-Asserts warning.
Daniel Dunbar [Mon, 18 May 2009 16:48:48 +0000 (16:48 +0000)]
Silence a Release-Asserts warning.

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

15 years agoFix for PR2386: distinguish between insertion and replacements in the
Eli Friedman [Mon, 18 May 2009 13:56:52 +0000 (13:56 +0000)]
Fix for PR2386: distinguish between insertion and replacements in the
delta tree.

The issue is roughly a conflict in ReplaceText between two kinds of
uses. One, it should be possible to replace a replacement: for example, the
ObjC rewriter calls ReplaceStmt for an expression, then replaces the resulting
expression with another expression.  Two, it should be possible to
replace text that already has text inserted before it: for example, the
HTML rewriter inserts a bunch of tags at the beginning of the line, then
tries to escape the first character on the line.  This patch
distinguishes the two cases by storing the deltas separately;
essentially, replacements and insertions no longer interfere with
each other.

Another possibility would be to add some sort of flag to ReplaceText, but
this seems a bit more intuitive and flexible.

There are a few downsides to the current solution: one is that there isn't
any way to remove/replace an insertion without touching additional
surrounding text; if such an operation turns out to be useful, an
additional method or flag can be added.  Another is that an insertion
and replacing a string of length zero are distinct operations; I'm not
sure how to resolve this, or whether it will be confusing in practice.

This is relatively sensitive code, so please test and tell me if
anything breaks.

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

15 years agoRemove tabs.
Eli Friedman [Mon, 18 May 2009 07:48:06 +0000 (07:48 +0000)]
Remove tabs.

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

15 years agoRemove unused parameter.
Eli Friedman [Mon, 18 May 2009 07:39:39 +0000 (07:39 +0000)]
Remove unused parameter.

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

15 years agoAdd some comments to ASTConsumers.h describing what the different
Eli Friedman [Mon, 18 May 2009 01:16:21 +0000 (01:16 +0000)]
Add some comments to ASTConsumers.h describing what the different
ASTConsumers actually do.

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

15 years agoMake ActOnWhileStmt take a FullExprArg for the condition expr.
Anders Carlsson [Sun, 17 May 2009 21:22:26 +0000 (21:22 +0000)]
Make ActOnWhileStmt take a FullExprArg for the condition expr.

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

15 years agoMake ActOnExprStmt take a FullExprArg.
Anders Carlsson [Sun, 17 May 2009 21:11:30 +0000 (21:11 +0000)]
Make ActOnExprStmt take a FullExprArg.

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

15 years agoFix instantiate-function-1.cpp.
Anders Carlsson [Sun, 17 May 2009 19:43:12 +0000 (19:43 +0000)]
Fix instantiate-function-1.cpp.

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

15 years agoFix DISABLE_SMART_POINTERS build.
Anders Carlsson [Sun, 17 May 2009 19:34:11 +0000 (19:34 +0000)]
Fix DISABLE_SMART_POINTERS build.

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

15 years agoImplement Sema::ActOnFinishFullExpr and create a CXXExprWithTemporaries node if neces...
Anders Carlsson [Sun, 17 May 2009 18:41:29 +0000 (18:41 +0000)]
Implement Sema::ActOnFinishFullExpr and create a CXXExprWithTemporaries node if necessary.

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

15 years agoAdd the FullExprArg wrapper and use it for if statement conditions.
Anders Carlsson [Sun, 17 May 2009 18:26:53 +0000 (18:26 +0000)]
Add the FullExprArg wrapper and use it for if statement conditions.

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

15 years agoAdd support for converting member pointer types to LLVM types. Also mangle pointer...
Anders Carlsson [Sun, 17 May 2009 17:41:20 +0000 (17:41 +0000)]
Add support for converting member pointer types to LLVM types. Also mangle pointer to member functions correctly and add tests.

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

15 years agoThis patch fixes two bugs in the GNU Objective-C runtime implementation. One is...
Fariborz Jahanian [Sun, 17 May 2009 16:49:27 +0000 (16:49 +0000)]
This patch fixes two bugs in the GNU Objective-C runtime implementation.  One is a case in rethrowing exceptions where the C types don't match correctly (I already sent this patch to Daniel Dunbar, who found the bug, so it may have already been committed).  The other fixes the case properties so that the methods generated as property accessors are added to the class structure correctly.
Patch by David Chisnall.

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

15 years agoAdd FIXME about not using MemberExpr nodes when the base type is a dependent type.
Anders Carlsson [Sun, 17 May 2009 16:28:18 +0000 (16:28 +0000)]
Add FIXME about not using MemberExpr nodes when the base type is a dependent type.

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

15 years agoUse the Itanium ABI for member pointers. Add a missing 'break' statement and a test...
Anders Carlsson [Sun, 17 May 2009 02:06:04 +0000 (02:06 +0000)]
Use the Itanium ABI for member pointers. Add a missing 'break' statement and a test case

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

15 years agoA couple of tweaks to make -ast-print produce code that's closer to
Eli Friedman [Sun, 17 May 2009 01:05:34 +0000 (01:05 +0000)]
A couple of tweaks to make -ast-print produce code that's closer to
valid C code.

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

15 years agoRewrite PureVirtualMethodCollector to use the overridden methods. Fixes <rdar://probl...
Anders Carlsson [Sun, 17 May 2009 00:00:05 +0000 (00:00 +0000)]
Rewrite PureVirtualMethodCollector to use the overridden methods. Fixes <rdar://problem/6854087>

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

15 years agoAdd OldMD to the list of methods NewMD overrides
Anders Carlsson [Sat, 16 May 2009 23:59:08 +0000 (23:59 +0000)]
Add OldMD to the list of methods NewMD overrides

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

15 years agoAdd setters/getters to CXXMethodDecl so it can keep track of which virtual member...
Anders Carlsson [Sat, 16 May 2009 23:58:37 +0000 (23:58 +0000)]
Add setters/getters to CXXMethodDecl so it can keep track of which virtual member functions it overrides (if any)

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

15 years agoMake the RAII extension warning silencing for __extension__ a bit
Eli Friedman [Sat, 16 May 2009 23:40:44 +0000 (23:40 +0000)]
Make the RAII extension warning silencing for __extension__ a bit
narrower, so it doesn't catch expresions that aren't sub-expressions of
__extension__ operator.

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

15 years agoTargets without long long should reduce the size of intmax_t
Eli Friedman [Sat, 16 May 2009 23:30:57 +0000 (23:30 +0000)]
Targets without long long should reduce the size of intmax_t
accordingly.

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

15 years agoRefactor address-of-void extension a bit so that it's more obviously
Eli Friedman [Sat, 16 May 2009 23:27:50 +0000 (23:27 +0000)]
Refactor address-of-void extension a bit so that it's more obviously
correct.  No functionality change, as far as I know.

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

15 years agoA few minor updates to the user manual.
Eli Friedman [Sat, 16 May 2009 23:17:30 +0000 (23:17 +0000)]
A few minor updates to the user manual.

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

15 years agoFix another case where the extern-ness of extern "C" wasn't being captured.
Anders Carlsson [Sat, 16 May 2009 22:05:23 +0000 (22:05 +0000)]
Fix another case where the extern-ness of extern "C" wasn't being captured.

This makes me think that we should make hasExternalStorage perform this check...

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

15 years agoDon't return member pointer types for static member functions. Fixes 6879261.
Anders Carlsson [Sat, 16 May 2009 21:43:42 +0000 (21:43 +0000)]
Don't return member pointer types for static member functions. Fixes 6879261.

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

15 years agoPR3942: Don't warn on unsigned overflow in preprocessor expressions.
Eli Friedman [Sat, 16 May 2009 21:24:10 +0000 (21:24 +0000)]
PR3942: Don't warn on unsigned overflow in preprocessor expressions.

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

15 years agoextern "C" should preserve the 'extern' qualifier for VarDecls. Fixes 6853728.
Anders Carlsson [Sat, 16 May 2009 21:02:39 +0000 (21:02 +0000)]
extern "C" should preserve the 'extern' qualifier for VarDecls. Fixes 6853728.

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

15 years agoImprove checking of member expressions where the base type is a dependent type.
Anders Carlsson [Sat, 16 May 2009 20:31:20 +0000 (20:31 +0000)]
Improve checking of member expressions where the base type is a dependent type.

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

15 years agoUpdate test case; I'm confused why this wasn't failing on the buildbot
Daniel Dunbar [Sat, 16 May 2009 19:30:01 +0000 (19:30 +0000)]
Update test case; I'm confused why this wasn't failing on the buildbot
though?

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

15 years agoTest case for previous commit. Explicit instantiation does the trick. (Thanks, Anders.)
Sebastian Redl [Sat, 16 May 2009 18:59:35 +0000 (18:59 +0000)]
Test case for previous commit. Explicit instantiation does the trick. (Thanks, Anders.)

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

15 years agoImplement instantiation of a few boring, simple expressions. I don't think these...
Sebastian Redl [Sat, 16 May 2009 18:50:46 +0000 (18:50 +0000)]
Implement instantiation of a few boring, simple expressions. I don't think these are testable yet, though.

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

15 years agoMissing change for r71941 (PR2044).
Eli Friedman [Sat, 16 May 2009 13:58:00 +0000 (13:58 +0000)]
Missing change for r71941 (PR2044).

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

15 years agoAvoid calling mergeTypes in C++. I think these are the correct C++
Eli Friedman [Sat, 16 May 2009 13:54:38 +0000 (13:54 +0000)]
Avoid calling mergeTypes in C++.  I think these are the correct C++
alternatives, but please correct me if I'm wrong.

I eventually plan to assert in mergeTypes that we aren't in C++ mode
because composite types are fundamentally not a part of C++. The
remaining callers for code in the regression tests are
Sema::WarnConflictingTypedMethods and CodeGenFunction::EmitFunctionProlog;
I'm not quite sure what the correct approach is for those callers.

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

15 years agoAdd stricter checking for va_arg.
Eli Friedman [Sat, 16 May 2009 12:46:54 +0000 (12:46 +0000)]
Add stricter checking for va_arg.

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

15 years agoPR2044: reject declarations of functions returning variably modified
Eli Friedman [Sat, 16 May 2009 12:15:55 +0000 (12:15 +0000)]
PR2044: reject declarations of functions returning variably modified
types.

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

15 years agoPR3009: Get rid of bogus warning for scalar compound literals.
Eli Friedman [Sat, 16 May 2009 11:45:48 +0000 (11:45 +0000)]
PR3009: Get rid of bogus warning for scalar compound literals.

This patch isn't quite ideal in that it eliminates the warning for
constructs like "int a = {1};", where the braces are in fact redundant.
However, that would have required a bunch of refactoring, and it's
much less likely to cause confusion compared to redundant nested braces.

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

15 years agoReflow some comments.
Mike Stump [Sat, 16 May 2009 07:57:57 +0000 (07:57 +0000)]
Reflow some comments.

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

15 years agoReflow some comments.
Mike Stump [Sat, 16 May 2009 07:39:55 +0000 (07:39 +0000)]
Reflow some comments.

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

15 years agoImplement a FIXME, we now pass in the locations of the braces for enums.
Mike Stump [Sat, 16 May 2009 07:06:02 +0000 (07:06 +0000)]
Implement a FIXME, we now pass in the locations of the braces for enums.

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

15 years agoUpdate checker build.
Ted Kremenek [Sat, 16 May 2009 06:05:27 +0000 (06:05 +0000)]
Update checker build.

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

15 years agoRemove useless wrapper.
Eli Friedman [Sat, 16 May 2009 05:56:02 +0000 (05:56 +0000)]
Remove useless wrapper.

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

15 years agoFixup __extension__ i = 1 parsing. Thanks Eli!
Mike Stump [Sat, 16 May 2009 04:31:34 +0000 (04:31 +0000)]
Fixup __extension__ i = 1 parsing.  Thanks Eli!

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

15 years agoFix: <rdar://problem/6893565> False positive: don't flag leaks for return types that...
Ted Kremenek [Sat, 16 May 2009 01:38:01 +0000 (01:38 +0000)]
Fix: <rdar://problem/6893565> False positive: don't flag leaks for return types that cannot be determined to be CF types

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

15 years agoFix another bug in BugReporter where we wouldn't always select the bug report in...
Ted Kremenek [Sat, 16 May 2009 01:11:58 +0000 (01:11 +0000)]
Fix another bug in BugReporter where we wouldn't always select the bug report in a bug equivalence class with the shortest path.

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

15 years agoTemplate instantiation for IndirectGotoStmt. Now my life is complete.
Douglas Gregor [Sat, 16 May 2009 00:20:29 +0000 (00:20 +0000)]
Template instantiation for IndirectGotoStmt. Now my life is complete.

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

15 years agoTemplate instantiation for switch statements
Douglas Gregor [Fri, 15 May 2009 23:57:33 +0000 (23:57 +0000)]
Template instantiation for switch statements

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

15 years agoRemoved superfluous code.
Fariborz Jahanian [Fri, 15 May 2009 23:19:35 +0000 (23:19 +0000)]
Removed superfluous code.

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

15 years agoEarly support for __format__attribute on blocks.
Fariborz Jahanian [Fri, 15 May 2009 23:15:03 +0000 (23:15 +0000)]
Early support for __format__attribute on blocks.
Work in progress...

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

15 years agoBasic support for member exprs where the base expr type is dependent.
Anders Carlsson [Fri, 15 May 2009 23:10:19 +0000 (23:10 +0000)]
Basic support for member exprs where the base expr type is dependent.

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

15 years agoClasses with "+load" methods need to go in the non-lazy class list (or
Daniel Dunbar [Fri, 15 May 2009 22:33:15 +0000 (22:33 +0000)]
Classes with "+load" methods need to go in the non-lazy class list (or
else the method will not be found by the runtime at class load time).

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

15 years agoTemplate instantiation for break and continue statements.
Douglas Gregor [Fri, 15 May 2009 22:32:39 +0000 (22:32 +0000)]
Template instantiation for break and continue statements.

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

15 years agoIntroduce the EXPR macro into StmtNodes.def, so that we can
Douglas Gregor [Fri, 15 May 2009 22:19:30 +0000 (22:19 +0000)]
Introduce the EXPR macro into StmtNodes.def, so that we can
distinguish between expression and statement nodes. No functionality
change.

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

15 years agoTemplate instantiation for "for" loops
Douglas Gregor [Fri, 15 May 2009 22:12:32 +0000 (22:12 +0000)]
Template instantiation for "for" loops

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

15 years agoUpdate checker build.
Ted Kremenek [Fri, 15 May 2009 21:56:27 +0000 (21:56 +0000)]
Update checker build.

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

15 years agoTemplate instantiation for do-while statements.
Douglas Gregor [Fri, 15 May 2009 21:56:04 +0000 (21:56 +0000)]
Template instantiation for do-while statements.

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

15 years agoFactor code for adding module-level class lists into separate method.
Daniel Dunbar [Fri, 15 May 2009 21:48:48 +0000 (21:48 +0000)]
Factor code for adding module-level class lists into separate method.
 - No functionality change.

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

15 years agoFixup parsing for (throw,throw) and __extension__ throw 1.
Mike Stump [Fri, 15 May 2009 21:47:08 +0000 (21:47 +0000)]
Fixup parsing for (throw,throw) and __extension__ throw 1.

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

15 years agoTemplate instantiation for WhileStmt and CXXConditionDeclExpr.
Douglas Gregor [Fri, 15 May 2009 21:45:53 +0000 (21:45 +0000)]
Template instantiation for WhileStmt and CXXConditionDeclExpr.

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

15 years agoMake sure that we use the canonical type for the names of instantiated
Douglas Gregor [Fri, 15 May 2009 21:18:27 +0000 (21:18 +0000)]
Make sure that we use the canonical type for the names of instantiated
constructors and destructors. This is a requirement of
DeclarationNameTable::getCXXSpecialName that we weren't assert()'ing,
so it should have been caught much earlier :(

Big thanks to Anders for the test case.

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

15 years agoimproved on diagnosing misplacement of sentinel attributes.
Fariborz Jahanian [Fri, 15 May 2009 21:18:04 +0000 (21:18 +0000)]
improved on diagnosing misplacement of sentinel attributes.
No change in functionality.

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

15 years agoAdd hack to scan-build to fix PR 4215
Ted Kremenek [Fri, 15 May 2009 21:14:16 +0000 (21:14 +0000)]
Add hack to scan-build to fix PR 4215
(http://llvm.org/bugs/show_bug.cgi?id=4215): When xcodebuild is invoked with
-sdk iphonesimulator3.0, use gcc-4.2 instead of the system default gcc.

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

15 years agoadded -fblocks to the test.
Fariborz Jahanian [Fri, 15 May 2009 20:49:33 +0000 (20:49 +0000)]
added -fblocks to the test.

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

15 years agoAllow instantiation of NULL expressions and statements
Douglas Gregor [Fri, 15 May 2009 20:47:12 +0000 (20:47 +0000)]
Allow instantiation of NULL expressions and statements

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

15 years agoThis patch finishes off the sentinel attribute handling for
Fariborz Jahanian [Fri, 15 May 2009 20:33:25 +0000 (20:33 +0000)]
This patch finishes off the sentinel attribute handling for
blocks and function pointers.

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

15 years agoI take it back, InstantiateExpr does not check for null.
Anders Carlsson [Fri, 15 May 2009 20:29:28 +0000 (20:29 +0000)]
I take it back, InstantiateExpr does not check for null.

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

15 years agoInstantiation support for 'this'
Anders Carlsson [Fri, 15 May 2009 20:26:03 +0000 (20:26 +0000)]
Instantiation support for 'this'

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

15 years agoNo need to null check the expr, Sema::SemaRef.InstantiateExpr handles all that.
Anders Carlsson [Fri, 15 May 2009 20:10:48 +0000 (20:10 +0000)]
No need to null check the expr, Sema::SemaRef.InstantiateExpr handles all that.

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

15 years agoAdd SemaTemplateInstantiateStmt.cpp to Xcode project.
Anders Carlsson [Fri, 15 May 2009 20:08:59 +0000 (20:08 +0000)]
Add SemaTemplateInstantiateStmt.cpp to Xcode project.

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

15 years agoMake sure that the type associated with a class template is dependent.
Douglas Gregor [Fri, 15 May 2009 19:11:46 +0000 (19:11 +0000)]
Make sure that the type associated with a class template is dependent.

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

15 years agoTemplate instantiation for "if" statements. Also:
Douglas Gregor [Fri, 15 May 2009 18:53:42 +0000 (18:53 +0000)]
Template instantiation for "if" statements. Also:

  - Skip semantic analysis of the "if" condition if it is type-dependent.
  - Added the location of the "else" keyword into IfStmt, so that we can
    provide it for type-checking after template instantiation.

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

15 years agoUpdate checker build.
Ted Kremenek [Fri, 15 May 2009 18:40:51 +0000 (18:40 +0000)]
Update checker build.

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

15 years agoA C++ member function always has either weak linkage (if it's inline or defined inlin...
Anders Carlsson [Fri, 15 May 2009 18:35:39 +0000 (18:35 +0000)]
A C++ member function always has either weak linkage (if it's inline or defined inline) or strong linkage (other cases).

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

15 years agoMove statement instantiation into its own file. No functionality change
Douglas Gregor [Fri, 15 May 2009 18:22:25 +0000 (18:22 +0000)]
Move statement instantiation into its own file. No functionality change

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

15 years agoWhen word-wrapping, be more defensive about a ridiculously small number of columns...
Douglas Gregor [Fri, 15 May 2009 18:05:24 +0000 (18:05 +0000)]
When word-wrapping, be more defensive about a ridiculously small number of columns. Fixes <rdar://problem/6892178>

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

15 years agoCall ActOnStartOfFunctionDecl/ActOnFinishFunctionBody when
Douglas Gregor [Fri, 15 May 2009 17:59:04 +0000 (17:59 +0000)]
Call ActOnStartOfFunctionDecl/ActOnFinishFunctionBody when
instantiating the definition of a function from a template.

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

15 years agoName mangling for class template specializations and template arguments.
Anders Carlsson [Fri, 15 May 2009 16:09:15 +0000 (16:09 +0000)]
Name mangling for class template specializations and template arguments.

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

15 years agoFix processing of -Ufoo to not inject "#undef foo 1" into the predefines
Chris Lattner [Fri, 15 May 2009 16:08:43 +0000 (16:08 +0000)]
Fix processing of -Ufoo to not inject "#undef foo 1" into the predefines
buffer.  This caused exciting nonsense like this:

$ clang t.c -fsyntax-only -UMACRO
In file included from <built-in>:104:
<command line>:1:14: warning: extra tokens at end of #undef directive [-Wextra-tokens]
#undef MACRO 1
             ^
             //
1 diagnostic generated.

rdar://6891800

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

15 years agoFix crash when deriving the enclosing summary of a method whose first selector slot...
Ted Kremenek [Fri, 15 May 2009 15:49:00 +0000 (15:49 +0000)]
Fix crash when deriving the enclosing summary of a method whose first selector slot has a null IdentifierInfo*.  This happens when analyzing Growl.

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

15 years agoRemove extra whitespace character in string literal. Purely cosmetic.
Ted Kremenek [Fri, 15 May 2009 06:02:08 +0000 (06:02 +0000)]
Remove extra whitespace character in string literal.  Purely cosmetic.

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

15 years agoUpdate checker build.
Ted Kremenek [Fri, 15 May 2009 05:59:34 +0000 (05:59 +0000)]
Update checker build.

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

15 years agoUse dyn_cast instead of cast to allow our assumptions to be safely wrong.
Ted Kremenek [Fri, 15 May 2009 05:34:49 +0000 (05:34 +0000)]
Use dyn_cast instead of cast to allow our assumptions to be safely wrong.

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

15 years agoCleanup internal checks bug reporting, allowing intermediate diagnostics to be genera...
Ted Kremenek [Fri, 15 May 2009 05:25:09 +0000 (05:25 +0000)]
Cleanup internal checks bug reporting, allowing intermediate diagnostics to be generated for bad argument warnings, bad branches, etc.

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

15 years agoRe-enable passing analyzer options from scan-build to ccc-analyzer.
Ted Kremenek [Fri, 15 May 2009 04:20:31 +0000 (04:20 +0000)]
Re-enable passing analyzer options from scan-build to ccc-analyzer.

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

15 years agoDon't strip quotes in compiler line for -D arguments.
Ted Kremenek [Fri, 15 May 2009 04:07:18 +0000 (04:07 +0000)]
Don't strip quotes in compiler line for -D arguments.

Fixes PR 4205.

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

15 years agoBugReporter (extensive diagnostics): Do not include the range of target '}'
Ted Kremenek [Fri, 15 May 2009 02:46:13 +0000 (02:46 +0000)]
BugReporter (extensive diagnostics): Do not include the range of target '}'

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

15 years agoPathDiagnosticLocation::asRange(): for a PathDiagnosticLocation, the range of a DeclS...
Ted Kremenek [Fri, 15 May 2009 02:05:25 +0000 (02:05 +0000)]
PathDiagnosticLocation::asRange(): for a PathDiagnosticLocation, the range of a DeclStmt is only the decl, not
the decl + initializer.

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