]> granicus.if.org Git - clang/log
clang
16 years agoFix PR2741 by making our newline tracking be aware of newlines that
Chris Lattner [Mon, 15 Jun 2009 01:25:23 +0000 (01:25 +0000)]
Fix PR2741 by making our newline tracking be aware of newlines that
can occur in the middle of comment tokens.

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

16 years ago"GCC emits an __objc_class_name_{classname} symbol for every class, and a correspondi...
Chris Lattner [Mon, 15 Jun 2009 01:09:11 +0000 (01:09 +0000)]
"GCC emits an __objc_class_name_{classname} symbol for every class, and a corresponding reference to this symbol for every compilation unit that references the class.  This causes linker errors when you try linking a program which references some classes but doesn't define them.  The attached patch implements this support in clang, so you can compile a class with clang, reference it in a file compiled with GCC, and have it all work correctly."

Patch by David Chisnall!

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

16 years agoPR4391: Tweak -ast-print output to generate valid output for edge cases
Eli Friedman [Sun, 14 Jun 2009 22:39:26 +0000 (22:39 +0000)]
PR4391: Tweak -ast-print output to generate valid output for edge cases
like "int x = + +3;".

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

16 years agoPR4390: Make sure to handle anonymous unions correctly while building
Eli Friedman [Sun, 14 Jun 2009 21:41:37 +0000 (21:41 +0000)]
PR4390: Make sure to handle anonymous unions correctly while building
static intializers for structs.

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

16 years agoTest modification.
Fariborz Jahanian [Sun, 14 Jun 2009 16:45:35 +0000 (16:45 +0000)]
Test modification.
Patch by Jean-Daniel Dupas

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

16 years agofix the menu's links
Nuno Lopes [Sun, 14 Jun 2009 09:40:09 +0000 (09:40 +0000)]
fix the menu's links

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

16 years agoIntroduce a SFINAE "trap" that keeps track of the number of errors
Douglas Gregor [Sun, 14 Jun 2009 08:02:22 +0000 (08:02 +0000)]
Introduce a SFINAE "trap" that keeps track of the number of errors
that were suppressed due to SFINAE. By checking whether any errors
occur at the end of template argument deduction, we avoid the
possibility of suppressing an error (due to SFINAE) and then
recovering so well that template argument deduction never detects that
there was a problem. Thanks to Eli for the push in this direction.

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

16 years agoUpdate LLVM.
Douglas Gregor [Sun, 14 Jun 2009 07:33:30 +0000 (07:33 +0000)]
Update LLVM.

Implement support for C++ Substitution Failure Is Not An Error
(SFINAE), which says that errors that occur during template argument
deduction do *not* produce diagnostics and do not necessarily make a
program ill-formed. Instead, template argument deduction silently
fails. This is currently implemented for template argument deduction
during matching of class template partial specializations, although
the mechanism will also apply to template argument deduction for
function templates. The scheme is simple:

  - If we are in a template argument deduction context, any diagnostic
    that is considered a SFINAE error (or warning) will be
    suppressed. The error will be propagated up the call stack via the
    normal means.
  - By default, all warnings and errors are SFINAE errors. Add the
    NoSFINAE class to a diagnostic in the .td file to make it a hard
    error (e.g., for access-control violations).

Note that, to make this fully work, every place in Sema that emits an
error *and then immediately recovers* will need to check
Sema::isSFINAEContext() to determine whether it must immediately
return an error rather than recovering.

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

16 years agoFix "for all intensive purposes" to "for all intents and purposes".
Nick Lewycky [Sun, 14 Jun 2009 04:08:08 +0000 (04:08 +0000)]
Fix "for all intensive purposes" to "for all intents and purposes".

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

16 years agoPR4351: Add constant evaluation for constructs like "foo == NULL", where
Eli Friedman [Sun, 14 Jun 2009 02:17:33 +0000 (02:17 +0000)]
PR4351: Add constant evaluation for constructs like "foo == NULL", where
foo has a constant address.

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

16 years agoSink the BuiltinInfo object from ASTContext into the
Chris Lattner [Sun, 14 Jun 2009 01:54:56 +0000 (01:54 +0000)]
Sink the BuiltinInfo object from ASTContext into the
preprocessor and initialize it early in clang-cc.  This
ensures that __has_builtin works in all modes, not just
when ASTContext is around.

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

16 years agomove the various builtins stuff from libast to libbasic. This
Chris Lattner [Sun, 14 Jun 2009 01:05:48 +0000 (01:05 +0000)]
move the various builtins stuff from libast to libbasic.  This
fixes a layering violation in lib/Basic/Targets.cpp.

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

16 years agoprune #includes, Builtins.h/cpp no longer depends on libast.
Chris Lattner [Sun, 14 Jun 2009 00:52:07 +0000 (00:52 +0000)]
prune #includes, Builtins.h/cpp no longer depends on libast.

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

16 years agomove GetBuiltinType from Builtin::Context to ASTContext.
Chris Lattner [Sun, 14 Jun 2009 00:45:47 +0000 (00:45 +0000)]
move GetBuiltinType from Builtin::Context to ASTContext.

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

16 years agochange ParseStatementOrDeclaration to emit the 'missing ;' with
Chris Lattner [Sun, 14 Jun 2009 00:23:56 +0000 (00:23 +0000)]
change ParseStatementOrDeclaration to emit the 'missing ;' with
ExpectAndConsume instead of custom diag logic.  This gets us an
insertion hint and positions the ; at the end of the line
instead of on the next token.  Before:

t.c:5:1: error: expected ';' after return statement
}
^

after:

t.c:4:11: error: expected ';' after return statement
  return 4
          ^
          ;

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

16 years agoimprove localizability by not passing english phrases into
Chris Lattner [Sun, 14 Jun 2009 00:07:48 +0000 (00:07 +0000)]
improve localizability by not passing english phrases into
diagnostics in some cases.

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

16 years agoSimplify mangleFunctionDecl by unnesting a crazy condition. This fixes
Chris Lattner [Sat, 13 Jun 2009 23:34:16 +0000 (23:34 +0000)]
Simplify mangleFunctionDecl by unnesting a crazy condition.  This fixes
the check for extern "c" system headers, which should prevent functiondecls
from being mangled.

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

16 years agoadd a handy predicate.
Chris Lattner [Sat, 13 Jun 2009 23:31:51 +0000 (23:31 +0000)]
add a handy predicate.

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

16 years agoFix the calling convention for structs/unions containing SSE vectors on
Eli Friedman [Sat, 13 Jun 2009 21:37:10 +0000 (21:37 +0000)]
Fix the calling convention for structs/unions containing SSE vectors on
x86-32.  This is slightly messy, but I think it's consistent with gcc.

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

16 years agodeclare an 'operator delete' to match operator new, this avoids many many
Chris Lattner [Sat, 13 Jun 2009 20:51:38 +0000 (20:51 +0000)]
declare an 'operator delete' to match operator new, this avoids many many
warnings when building with VC++, patch by AlisdairM!

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

16 years agofix typo
Chris Lattner [Sat, 13 Jun 2009 20:35:58 +0000 (20:35 +0000)]
fix typo

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

16 years agoDon't include system headers when overriding triple.
Daniel Dunbar [Sat, 13 Jun 2009 20:02:26 +0000 (20:02 +0000)]
Don't include system headers when overriding triple.

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

16 years agoForce Obj-C runtime version for this test
Daniel Dunbar [Sat, 13 Jun 2009 19:40:25 +0000 (19:40 +0000)]
Force Obj-C runtime version for this test

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

16 years agoSwitch to the new test runner.
Daniel Dunbar [Sat, 13 Jun 2009 18:28:48 +0000 (18:28 +0000)]
Switch to the new test runner.
 - TestRunner.sh still needs to be moved over.

 - Please let me know if you find problems / missing features.

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

16 years agoHave CheckClassTemplatePartialSpecializationArgs take a TemplateArgumentListBuilder...
Anders Carlsson [Sat, 13 Jun 2009 18:20:51 +0000 (18:20 +0000)]
Have CheckClassTemplatePartialSpecializationArgs take a TemplateArgumentListBuilder. No functionality change.

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

16 years agoa couple minor tweaks
Chris Lattner [Sat, 13 Jun 2009 18:11:10 +0000 (18:11 +0000)]
a couple minor tweaks

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

16 years agoAllow initializing a vector with a vector in addition to allowing a list
Eli Friedman [Sat, 13 Jun 2009 10:38:46 +0000 (10:38 +0000)]
Allow initializing a vector with a vector in addition to allowing a list
of the elements.  Issue reported on cfe-dev by Mattias Holm.

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

16 years agoimplement and document a new __has_feature and __has_builtin magic
Chris Lattner [Sat, 13 Jun 2009 07:13:28 +0000 (07:13 +0000)]
implement and document a new __has_feature and __has_builtin magic
builtin preprocessor macro.  This appears to work with two caveats:
1) builtins are registered in -E mode, and 2) target-specific builtins
are unconditionally registered even if they aren't supported by the
target (e.g. SSE4 builtin when only SSE1 is enabled).

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

16 years agoMove a bunch of tests into temp.param, and write a few tests for paragraphs that...
Douglas Gregor [Sat, 13 Jun 2009 06:59:07 +0000 (06:59 +0000)]
Move a bunch of tests into temp.param, and write a few tests for paragraphs that hadn't been touched before

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

16 years agoAdd some random C++ standard tests.
Daniel Dunbar [Sat, 13 Jun 2009 06:16:36 +0000 (06:16 +0000)]
Add some random C++ standard tests.

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

16 years agoAdd the structure for a C++ test suite that mimics the structure of the C++ standard
Douglas Gregor [Sat, 13 Jun 2009 06:06:53 +0000 (06:06 +0000)]
Add the structure for a C++ test suite that mimics the structure of the C++ standard

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

16 years agoFix for PR4382: allow instantiating dependent nested name specifiers.
Eli Friedman [Sat, 13 Jun 2009 04:51:30 +0000 (04:51 +0000)]
Fix for PR4382: allow instantiating dependent nested name specifiers.
I'm not completely sure this is the right way to fix this issue, but it seems
reasonable, and it's consistent with the non-template code for this
construct.

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

16 years agoIf a CXXRecordDecl is a class template, the 'this' type should be the injected class...
Anders Carlsson [Sat, 13 Jun 2009 02:59:33 +0000 (02:59 +0000)]
If a CXXRecordDecl is a class template, the 'this' type should be the injected class name type. Fixes pr4383.

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

16 years agoMore work on type parameter packs.
Anders Carlsson [Sat, 13 Jun 2009 02:08:00 +0000 (02:08 +0000)]
More work on type parameter packs.

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

16 years agoStop tracking non-compound value for struct. It may be caused by imprecise cast
Zhongxing Xu [Sat, 13 Jun 2009 01:31:11 +0000 (01:31 +0000)]
Stop tracking non-compound value for struct. It may be caused by imprecise cast
logic.

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

16 years agoRemove a bunch of unnecessary template argument deduction code that was
Douglas Gregor [Sat, 13 Jun 2009 00:59:32 +0000 (00:59 +0000)]
Remove a bunch of unnecessary template argument deduction code that was
obviously written by someone who didn't read C++ [temp.class.spec].

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

16 years agoMove template type argument checking out into a separate function. No functionality...
Anders Carlsson [Sat, 13 Jun 2009 00:33:33 +0000 (00:33 +0000)]
Move template type argument checking out into a separate function. No functionality change.

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

16 years agoWhen some template parameters of a class template partial
Douglas Gregor [Sat, 13 Jun 2009 00:26:55 +0000 (00:26 +0000)]
When some template parameters of a class template partial
specialization cannot be deduced, produce a warning noting that the
affected class template partial specialization will never be used.

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

16 years agoFix PR4372, another case where non-prototyped functions can prevent
Chris Lattner [Sat, 13 Jun 2009 00:26:38 +0000 (00:26 +0000)]
Fix PR4372, another case where non-prototyped functions can prevent
always_inline from working.

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

16 years agoImprovements to TemplateArgumentListBuilder to make it work better with parameter...
Anders Carlsson [Sat, 13 Jun 2009 00:08:58 +0000 (00:08 +0000)]
Improvements to TemplateArgumentListBuilder to make it work better with parameter packs.

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

16 years agoA parameter pack must always come last in a class template.
Anders Carlsson [Fri, 12 Jun 2009 23:20:15 +0000 (23:20 +0000)]
A parameter pack must always come last in a class template.

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

16 years agoNo need to mark the parameter as invalid, just ignore the default argument.
Anders Carlsson [Fri, 12 Jun 2009 23:13:22 +0000 (23:13 +0000)]
No need to mark the parameter as invalid, just ignore the default argument.

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

16 years agoAddress more comments from Doug.
Anders Carlsson [Fri, 12 Jun 2009 23:09:56 +0000 (23:09 +0000)]
Address more comments from Doug.

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

16 years agoadd the location of the ')' in a do/while statement to DoStmt.
Chris Lattner [Fri, 12 Jun 2009 23:04:47 +0000 (23:04 +0000)]
add the location of the ')' in a do/while statement to DoStmt.
This fixes a source range problem reported by Olaf Krzikalla.

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

16 years agoAddress comments from Doug - Add a Sema::SemaRef.BuildBlockPointerType and use it.
Anders Carlsson [Fri, 12 Jun 2009 22:56:54 +0000 (22:56 +0000)]
Address comments from Doug - Add a Sema::SemaRef.BuildBlockPointerType and use it.

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

16 years agoIt looks like we've finished off matching of class template partial specializations...
Douglas Gregor [Fri, 12 Jun 2009 22:31:52 +0000 (22:31 +0000)]
It looks like we've finished off matching of class template partial specializations; add comments and update the C++ status page

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

16 years agoParameter packs can't have default arguments.
Anders Carlsson [Fri, 12 Jun 2009 22:30:13 +0000 (22:30 +0000)]
Parameter packs can't have default arguments.

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

16 years agoKeep track of whether a type parameter is actually a type parameter pack.
Anders Carlsson [Fri, 12 Jun 2009 22:23:22 +0000 (22:23 +0000)]
Keep track of whether a type parameter is actually a type parameter pack.

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

16 years agoFinish implementing checking of class template partial specializations
Douglas Gregor [Fri, 12 Jun 2009 22:21:45 +0000 (22:21 +0000)]
Finish implementing checking of class template partial specializations

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

16 years agoDiagnose C++ [temp.class.spec]p9b3, where a class template partial
Douglas Gregor [Fri, 12 Jun 2009 22:08:06 +0000 (22:08 +0000)]
Diagnose C++ [temp.class.spec]p9b3, where a class template partial
specialization's arguments are identical to the implicit template
arguments of the primary template. Typically, this is meant to be a
declaration/definition of the primary template, so we give that
advice.

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

16 years agoDiagnose the incorrect use of non-type template arguments for class
Douglas Gregor [Fri, 12 Jun 2009 21:21:02 +0000 (21:21 +0000)]
Diagnose the incorrect use of non-type template arguments for class
template partial specializations.

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

16 years agoMinor formatting tweak.
Eli Friedman [Fri, 12 Jun 2009 20:11:05 +0000 (20:11 +0000)]
Minor formatting tweak.

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

16 years agoFix a minor formatting mistake.
Eli Friedman [Fri, 12 Jun 2009 20:08:48 +0000 (20:08 +0000)]
Fix a minor formatting mistake.

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

16 years agoSome updates to the gcc extension sections of the users manual.
Eli Friedman [Fri, 12 Jun 2009 20:04:25 +0000 (20:04 +0000)]
Some updates to the gcc extension sections of the users manual.

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

16 years agoParse support for C++0x type parameter packs.
Anders Carlsson [Fri, 12 Jun 2009 19:58:00 +0000 (19:58 +0000)]
Parse support for C++0x type parameter packs.

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

16 years agoVerify that the template parameters of a class template partial
Douglas Gregor [Fri, 12 Jun 2009 19:43:02 +0000 (19:43 +0000)]
Verify that the template parameters of a class template partial
specialization do not have default arguments
(C++ [temp.class.spec]p10).

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

16 years agoUpdate the C++ status to reflect improvements in template argument deduction and...
Douglas Gregor [Fri, 12 Jun 2009 19:15:38 +0000 (19:15 +0000)]
Update the C++ status to reflect improvements in template argument deduction and the handling of class template partial specializations

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

16 years agoFix PR4365.
Anders Carlsson [Fri, 12 Jun 2009 18:53:02 +0000 (18:53 +0000)]
Fix PR4365.

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

16 years agoImprove template argument deduction to keep track of why template
Douglas Gregor [Fri, 12 Jun 2009 18:26:56 +0000 (18:26 +0000)]
Improve template argument deduction to keep track of why template
argument deduction failed. For example, given

  template<typename T> struct is_same<T, T> { ... };

template argument deduction will fail for is_same<int, float>, and now
reports enough information

Right now, we don't do anything with this extra information, but it
can be used for informative diagnostics that say, e.g., "template
argument deduction failed because T was deduced to 'int' in one
context and 'float' in another".

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

16 years agoIt's an error to use a function declared in a class definition as a default argument...
Anders Carlsson [Fri, 12 Jun 2009 16:51:40 +0000 (16:51 +0000)]
It's an error to use a function declared in a class definition as a default argument before the function has been declared.

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

16 years agoDeducation and instantiation of block types.
Anders Carlsson [Fri, 12 Jun 2009 16:23:10 +0000 (16:23 +0000)]
Deducation and instantiation of block types.

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

16 years agouse getAsPointerType() method.
Zhongxing Xu [Fri, 12 Jun 2009 03:59:12 +0000 (03:59 +0000)]
use getAsPointerType() method.

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

16 years agoCMake: New variable LLVM_LIBDIR_SUFFIX.
Oscar Fuentes [Fri, 12 Jun 2009 02:54:12 +0000 (02:54 +0000)]
CMake: New variable LLVM_LIBDIR_SUFFIX.

Patch by Ingmar Vanhassel!

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

16 years agoDon't assert when generating code with static_asserts.
Anders Carlsson [Thu, 11 Jun 2009 21:22:55 +0000 (21:22 +0000)]
Don't assert when generating code with static_asserts.

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

16 years agoPR4371: Reduce the inlining threshold outside of -O3. This makes
Eli Friedman [Thu, 11 Jun 2009 20:33:41 +0000 (20:33 +0000)]
PR4371: Reduce the inlining threshold outside of -O3.  This makes
the clang inlining threshold consistent with the threshold for llvm-gcc.

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

16 years agoFollowing gcc, hide the hack to include the SSE2 intrinsics from
Eli Friedman [Thu, 11 Jun 2009 18:50:02 +0000 (18:50 +0000)]
Following gcc, hide the hack to include the SSE2 intrinsics from
xmmintrin.h in an ifdef.

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

16 years agoAdd summary lookup for IOServiceGetMatchingService.
Ted Kremenek [Thu, 11 Jun 2009 18:17:24 +0000 (18:17 +0000)]
Add summary lookup for IOServiceGetMatchingService.
Convert tabs to spaces.

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

16 years agoRefactor some function name -> summary lookup using a switch statement.
Ted Kremenek [Thu, 11 Jun 2009 18:10:48 +0000 (18:10 +0000)]
Refactor some function name -> summary lookup using a switch statement.

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

16 years agoOnce we have deduced the template arguments of a class template
Douglas Gregor [Thu, 11 Jun 2009 18:10:32 +0000 (18:10 +0000)]
Once we have deduced the template arguments of a class template
partial specialization, substitute those template arguments back into
the template arguments of the class template partial specialization to
see if the results still match the original template arguments.

This code is more general than it needs to be, since we don't yet
diagnose C++ [temp.class.spec]p9. However, it's likely to be needed
for function templates.

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

16 years agoAdd a null check that fixes the crash in PR4362, and make sure to instantiate non...
Anders Carlsson [Thu, 11 Jun 2009 16:06:49 +0000 (16:06 +0000)]
Add a null check that fixes the crash in PR4362, and make sure to instantiate non-type template arguments.

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

16 years agoPoint to the clang driver, not the ccc driver
Douglas Gregor [Thu, 11 Jun 2009 14:59:18 +0000 (14:59 +0000)]
Point to the clang driver, not the ccc driver

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

16 years agoAdd pseudo-destructors to the Open Projects list
Douglas Gregor [Thu, 11 Jun 2009 14:55:39 +0000 (14:55 +0000)]
Add pseudo-destructors to the Open Projects list

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

16 years agoPrune some projects that have already been started
Douglas Gregor [Thu, 11 Jun 2009 14:53:37 +0000 (14:53 +0000)]
Prune some projects that have already been started

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

16 years agoBind the mistakenly generated nonloc::SymbolVal to struct correctly. See the
Zhongxing Xu [Thu, 11 Jun 2009 09:11:27 +0000 (09:11 +0000)]
Bind the mistakenly generated nonloc::SymbolVal to struct correctly. See the
comments for added test case for details.

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

16 years agoUse more robust getAsRecordType() method.
Zhongxing Xu [Thu, 11 Jun 2009 07:27:30 +0000 (07:27 +0000)]
Use more robust getAsRecordType() method.

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

16 years agoMake sure to calculate value-dependence correctly when deal with ICEs.
Eli Friedman [Thu, 11 Jun 2009 01:11:20 +0000 (01:11 +0000)]
Make sure to calculate value-dependence correctly when deal with ICEs.
(Actually, this isn't precisely correct, but it doesn't make
sense to query whether an expression that isn't an ICE is
value-dependent anyway.)

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

16 years agoMove test to be with the other typename tests.
Eli Friedman [Thu, 11 Jun 2009 01:01:02 +0000 (01:01 +0000)]
Move test to be with the other typename tests.

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

16 years agoPR4364: fix parsing 'typename' in an expression.
Eli Friedman [Thu, 11 Jun 2009 00:33:41 +0000 (00:33 +0000)]
PR4364: fix parsing 'typename' in an expression.

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

16 years agoSeparate TemplateArgument instantiation logic into its own function. No functionality...
Douglas Gregor [Thu, 11 Jun 2009 00:06:24 +0000 (00:06 +0000)]
Separate TemplateArgument instantiation logic into its own function. No functionality change.

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

16 years agoTemplate argument deduction for member pointers.
Douglas Gregor [Wed, 10 Jun 2009 23:47:09 +0000 (23:47 +0000)]
Template argument deduction for member pointers.

Also, introduced some of the framework for performing instantiation as
part of template argument deduction.

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

16 years agoSupport complex properties, ivars and message expressions.
Daniel Dunbar [Wed, 10 Jun 2009 04:38:50 +0000 (04:38 +0000)]
Support complex properties, ivars and message expressions.

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

16 years agoPR4350: Make sure we don't create invalid printf attributes. This isn't
Eli Friedman [Wed, 10 Jun 2009 04:01:38 +0000 (04:01 +0000)]
PR4350: Make sure we don't create invalid printf attributes.  This isn't
visible anywhere normally because the printf format checks for
this case, and we don't print out attribute values anywhere.  Original
patch by Roberto Bagnara.

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

16 years agoPR4353: Add support for \E as a character escape.
Eli Friedman [Wed, 10 Jun 2009 01:32:39 +0000 (01:32 +0000)]
PR4353: Add support for \E as a character escape.

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

16 years agoHandle member pointer types with dependent class types (e.g., int
Douglas Gregor [Tue, 9 Jun 2009 22:17:39 +0000 (22:17 +0000)]
Handle member pointer types with dependent class types (e.g., int
T::*) and implement template instantiation for member pointer types.

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

16 years agoExample metaprogram for reversing and searching in a type list
Douglas Gregor [Tue, 9 Jun 2009 21:22:32 +0000 (21:22 +0000)]
Example metaprogram for reversing and searching in a type list

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

16 years agoImplement template argument deduction for class template
Douglas Gregor [Tue, 9 Jun 2009 16:35:58 +0000 (16:35 +0000)]
Implement template argument deduction for class template
specialization types. As the example shows, we can now compute the
length of a type-list using a template metaprogram and class template
partial specialization.

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

16 years agoAdd redirects to new static analysis web site.
Ted Kremenek [Tue, 9 Jun 2009 02:17:37 +0000 (02:17 +0000)]
Add redirects to new static analysis web site.

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

16 years agoUpdate static analyzer link to new website.
Ted Kremenek [Tue, 9 Jun 2009 01:37:34 +0000 (01:37 +0000)]
Update static analyzer link to new website.

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

16 years agoComment out preliminary text due to wishful thinking of getting more documentation...
Ted Kremenek [Tue, 9 Jun 2009 01:32:41 +0000 (01:32 +0000)]
Comment out preliminary text due to wishful thinking of getting more documentation done by this point.

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

16 years agoLast menu color tweaking (for now).
Ted Kremenek [Tue, 9 Jun 2009 01:31:18 +0000 (01:31 +0000)]
Last menu color tweaking (for now).

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

16 years agoMore color tweaking.
Ted Kremenek [Tue, 9 Jun 2009 01:28:57 +0000 (01:28 +0000)]
More color tweaking.

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

16 years agoUpdate menu colors.
Ted Kremenek [Tue, 9 Jun 2009 01:28:04 +0000 (01:28 +0000)]
Update menu colors.

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

16 years agoUpdate menu color.
Ted Kremenek [Tue, 9 Jun 2009 01:26:30 +0000 (01:26 +0000)]
Update menu color.

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

16 years agoUpdate checker build file (accidentally used old one).
Ted Kremenek [Tue, 9 Jun 2009 01:25:03 +0000 (01:25 +0000)]
Update checker build file (accidentally used old one).

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

16 years agoFix link.
Ted Kremenek [Tue, 9 Jun 2009 01:24:15 +0000 (01:24 +0000)]
Fix link.

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

16 years agoAdd more parser support for Microsoft extensions.
Eli Friedman [Mon, 8 Jun 2009 23:27:34 +0000 (23:27 +0000)]
Add more parser support for Microsoft extensions.

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

16 years agoFix test, which could miss failures, and also avoid leaving temporary .i file in
Daniel Dunbar [Mon, 8 Jun 2009 22:44:26 +0000 (22:44 +0000)]
Fix test, which could miss failures, and also avoid leaving temporary .i file in
source directory.

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

16 years agoAdd stack alignment to x86_64 target data.
Daniel Dunbar [Mon, 8 Jun 2009 22:39:13 +0000 (22:39 +0000)]
Add stack alignment to x86_64 target data.
 - <rdar://problem/6948443> WARNING: Linking two modules of different data
   layouts!

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

16 years agoForward -C and -CC to clang.
Daniel Dunbar [Mon, 8 Jun 2009 21:48:20 +0000 (21:48 +0000)]
Forward -C and -CC to clang.
 - <rdar://problem/6945384> Driver should pass down -C and -CC

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

16 years agoAdd skeleton files for new analyzer site.
Ted Kremenek [Mon, 8 Jun 2009 21:21:24 +0000 (21:21 +0000)]
Add skeleton files for new analyzer site.

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