]> granicus.if.org Git - clang/log
clang
14 years agoCanonicalize template template parameters when canonicalizing a
Douglas Gregor [Wed, 16 Jun 2010 21:09:37 +0000 (21:09 +0000)]
Canonicalize template template parameters when canonicalizing a
template name that refers to such a parameter. It's amazing that this
problem didn't surface earlier. Fixes PR7387.

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

14 years agotests: Update Frontend config to actually run ir-support tests.
Daniel Dunbar [Wed, 16 Jun 2010 20:04:36 +0000 (20:04 +0000)]
tests: Update Frontend config to actually run ir-support tests.

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

14 years agoC return types must be complete as well.
Fariborz Jahanian [Wed, 16 Jun 2010 19:56:08 +0000 (19:56 +0000)]
C return types must be complete as well.
Moved check before we build the ObjCMessageExpr node.
(PR7386 related).

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

14 years agoChange the test for which ABI/CC to use on ARM to be base on the environment
Rafael Espindola [Wed, 16 Jun 2010 19:01:17 +0000 (19:01 +0000)]
Change the test for which ABI/CC to use on ARM to be base on the environment
(the last argument of the triple).

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

14 years agoMake sure result type of objc++ message expression is
Fariborz Jahanian [Wed, 16 Jun 2010 18:56:04 +0000 (18:56 +0000)]
Make sure result type of objc++ message expression is
complete before attempting to bind it to a temporary.
Fixes PR7386.

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

14 years agoA a new test for my previous patch.
Rafael Espindola [Wed, 16 Jun 2010 18:02:31 +0000 (18:02 +0000)]
A a new test for my previous patch.

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

14 years agoFix tests that I missed from my previous commit.
Rafael Espindola [Wed, 16 Jun 2010 17:49:52 +0000 (17:49 +0000)]
Fix tests that I missed from my previous commit.

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

14 years agoTest commit by adding a blank comment line.
Zhanyong Wan [Wed, 16 Jun 2010 17:21:03 +0000 (17:21 +0000)]
Test commit by adding a blank comment line.

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

14 years agoFrontend: Allow passing -cc1 level arguments to plugins. Patch by Troy Straszheim!
Daniel Dunbar [Wed, 16 Jun 2010 16:59:23 +0000 (16:59 +0000)]
Frontend: Allow passing -cc1 level arguments to plugins. Patch by Troy Straszheim!

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

14 years agoDriver: Ignore -ffast-math and -f[no-]finite-math-only.
Daniel Dunbar [Wed, 16 Jun 2010 16:59:17 +0000 (16:59 +0000)]
Driver: Ignore -ffast-math and -f[no-]finite-math-only.

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

14 years agoDon't poke at an undefined class type of a field. Fixes PR7355.
Douglas Gregor [Wed, 16 Jun 2010 16:54:04 +0000 (16:54 +0000)]
Don't poke at an undefined class type of a field. Fixes PR7355.

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

14 years agoDowngrade the error when using a typedef in the nested-name-specifier
Douglas Gregor [Wed, 16 Jun 2010 16:26:47 +0000 (16:26 +0000)]
Downgrade the error when using a typedef in the nested-name-specifier
of an explicit instantiation to an ExtWarn, since nobody else seems to
diagnose this problem.

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

14 years agoAdd Cygwin C++ header search path.
Douglas Gregor [Wed, 16 Jun 2010 16:24:51 +0000 (16:24 +0000)]
Add Cygwin C++ header search path.

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

14 years agoFixed conflict between objc_memmove_collectable builtin
Fariborz Jahanian [Wed, 16 Jun 2010 16:22:04 +0000 (16:22 +0000)]
Fixed conflict between objc_memmove_collectable builtin
decl. and one ddefined in darwin header file.

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

14 years agoDon't set the calling convention for ARM if it is already the default.
Rafael Espindola [Wed, 16 Jun 2010 16:13:39 +0000 (16:13 +0000)]
Don't set the calling convention for ARM if it is already the default.

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

14 years agoIf a non-dependent base class initializer fails to match any direct or
Douglas Gregor [Wed, 16 Jun 2010 16:03:14 +0000 (16:03 +0000)]
If a non-dependent base class initializer fails to match any direct or
virtual base class, but the class still has dependent base classes,
then don't diagnose the failed match as an error: the right base class
might magically appear. Fixes PR7259.

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

14 years agoAdd some missing parentheses, from Anton Yartsev
Douglas Gregor [Wed, 16 Jun 2010 15:28:57 +0000 (15:28 +0000)]
Add some missing parentheses, from Anton Yartsev

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

14 years agoRevert r106099; it broke self-host.
Douglas Gregor [Wed, 16 Jun 2010 15:23:05 +0000 (15:23 +0000)]
Revert r106099; it broke self-host.

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

14 years agoAdded TemplateTypeParmType::getDecl().
Abramo Bagnara [Wed, 16 Jun 2010 14:59:30 +0000 (14:59 +0000)]
Added TemplateTypeParmType::getDecl().

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

14 years agoRework the unqualified-lookup-in-templates section of the compatibility
John McCall [Wed, 16 Jun 2010 10:48:16 +0000 (10:48 +0000)]
Rework the unqualified-lookup-in-templates section of the compatibility
document.  jyasskin, let me know if this meets your needs.

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

14 years agoFix the build. Using declarations should not be considering when looking
John McCall [Wed, 16 Jun 2010 09:33:39 +0000 (09:33 +0000)]
Fix the build.  Using declarations should not be considering when looking
for overridden virtual methods.

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

14 years agoSome more nods to HTML well-formedness.
John McCall [Wed, 16 Jun 2010 08:48:08 +0000 (08:48 +0000)]
Some more nods to HTML well-formedness.

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

14 years agoFix a point of semantics with using declaration hiding: method templates
John McCall [Wed, 16 Jun 2010 08:42:20 +0000 (08:42 +0000)]
Fix a point of semantics with using declaration hiding:  method templates
introduced by using decls are hidden even if their template parameter lists
or return types differ from the "overriding" declaration.

Propagate using shadow declarations around more effectively when looking up
template-ids.  Reperform lookup for template-ids in member expressions so that
access control is properly set up.

Fix some number of latent bugs involving template-ids with totally invalid
base types.  You can only actually get these with a scope specifier, since
otherwise the template-id won't parse as a template-id.

Fixes PR7384.

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

14 years agoWe return Loc where we know.
Zhongxing Xu [Wed, 16 Jun 2010 06:16:46 +0000 (06:16 +0000)]
We return Loc where we know.

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

14 years agoTypo.
Zhongxing Xu [Wed, 16 Jun 2010 05:58:35 +0000 (05:58 +0000)]
Typo.

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

14 years agoAlthough arguments can not be undefined when we get here, they can still be
Zhongxing Xu [Wed, 16 Jun 2010 05:56:39 +0000 (05:56 +0000)]
Although arguments can not be undefined when we get here, they can still be
unknown.

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

14 years agoCast earlier. We know we can get a DefinedSVal.
Zhongxing Xu [Wed, 16 Jun 2010 05:52:03 +0000 (05:52 +0000)]
Cast earlier. We know we can get a DefinedSVal.

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

14 years agoRegister CallAndMessageChecker before AttrNonNullChecker. Then we can assume
Zhongxing Xu [Wed, 16 Jun 2010 05:45:09 +0000 (05:45 +0000)]
Register CallAndMessageChecker before AttrNonNullChecker. Then we can assume
arguments are not undefined.

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

14 years agoAdd StreamChecker. This checker models and checks stream manipulation functions.
Zhongxing Xu [Wed, 16 Jun 2010 05:38:05 +0000 (05:38 +0000)]
Add StreamChecker. This checker models and checks stream manipulation functions.
This is the start.

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

14 years agoStart mangling function types in the Microsoft C++ Mangler.
Charles Davis [Wed, 16 Jun 2010 05:33:16 +0000 (05:33 +0000)]
Start mangling function types in the Microsoft C++ Mangler.

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

14 years agoFix template ordering compatibility docs. I missed another section that covered
Jeffrey Yasskin [Wed, 16 Jun 2010 01:12:12 +0000 (01:12 +0000)]
Fix template ordering compatibility docs. I missed another section that covered
the same thing.

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

14 years agoGive Type::isIntegralType() an ASTContext parameter, so that it
Douglas Gregor [Wed, 16 Jun 2010 00:35:25 +0000 (00:35 +0000)]
Give Type::isIntegralType() an ASTContext parameter, so that it
provides C "integer type" semantics in C and C++ "integral type"
semantics in C++.

Note that I still need to update isIntegerType (and possibly other
predicates) using the same approach I've taken for
isIntegralType(). The two should have the same meaning, but currently
don't (!).

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

14 years agoIntroduce Type::isIntegralOrEnumerationType(), to cover those places
Douglas Gregor [Wed, 16 Jun 2010 00:17:44 +0000 (00:17 +0000)]
Introduce Type::isIntegralOrEnumerationType(), to cover those places
in C++ that involve both integral and enumeration types. Convert all
of the callers to Type::isIntegralType() that are meant to work with
both integral and enumeration types over to
Type::isIntegralOrEnumerationType(), to prepare to eliminate
enumeration types as integral types.

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

14 years agoWorkaround a possible VS C++ bug.
Fariborz Jahanian [Wed, 16 Jun 2010 00:16:38 +0000 (00:16 +0000)]
Workaround a possible VS C++ bug.

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

14 years agoDescribe a gcc compatibility problem that occurs when a template calls a
Jeffrey Yasskin [Tue, 15 Jun 2010 23:50:08 +0000 (23:50 +0000)]
Describe a gcc compatibility problem that occurs when a template calls a
function defined between its declaration and an instantiation, and that
function isn't findable through ADL.

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

14 years agoMoved objective-c++ code gen. tests to their own directory and
Fariborz Jahanian [Tue, 15 Jun 2010 23:49:10 +0000 (23:49 +0000)]
Moved objective-c++ code gen. tests to their own directory and
added a new test case (related to radar 8070772).

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

14 years agoMove CodeGenOptions.h *back* into Frontend. This should have been done when the
Chandler Carruth [Tue, 15 Jun 2010 23:19:56 +0000 (23:19 +0000)]
Move CodeGenOptions.h *back* into Frontend. This should have been done when the
dependency edge was reversed such that CodeGen depends on Frontend.

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

14 years agoPatch adds support for copying of those
Fariborz Jahanian [Tue, 15 Jun 2010 22:44:06 +0000 (22:44 +0000)]
Patch adds support for copying of those
objective-c++ class objects which have GC'able objc object
pointers and need to use ObjC's objc_memmove_collectable
API (radar 8070772).

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

14 years agoUpdate equality and relationship comparisons of pointers to reflect
Douglas Gregor [Tue, 15 Jun 2010 21:38:40 +0000 (21:38 +0000)]
Update equality and relationship comparisons of pointers to reflect
C++ semantics, eliminating an extension diagnostic that doesn't match
C++ semantics (ordered comparison with NULL) and tightening some
extwarns to errors in C++ to match GCC and maintain conformance in
SFINAE contexts. Fixes <rdar://problem/7941392>.

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

14 years agofix the various buildbot failures by ensuring that tokens are really completely initi...
Chris Lattner [Tue, 15 Jun 2010 21:06:38 +0000 (21:06 +0000)]
fix the various buildbot failures by ensuring that tokens are really completely initialized.

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

14 years agoRemove a completely useless and utterly incorrect assertion.
Douglas Gregor [Tue, 15 Jun 2010 20:38:36 +0000 (20:38 +0000)]
Remove a completely useless and utterly incorrect assertion.

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

14 years agoDriver: Support -Wp,-MMD,FOO, which I found an instance of. :(
Daniel Dunbar [Tue, 15 Jun 2010 20:30:18 +0000 (20:30 +0000)]
Driver: Support -Wp,-MMD,FOO, which I found an instance of. :(

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

14 years agoTeach code completion not to ignore data members when performing code
Douglas Gregor [Tue, 15 Jun 2010 20:26:51 +0000 (20:26 +0000)]
Teach code completion not to ignore data members when performing code
completion for expressions.

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

14 years agoadd a testcase, from Michael Spencer
Chris Lattner [Tue, 15 Jun 2010 18:56:20 +0000 (18:56 +0000)]
add a testcase, from Michael Spencer

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

14 years agofix an uninitialized variable, patch by Michael Spencer!
Chris Lattner [Tue, 15 Jun 2010 18:55:23 +0000 (18:55 +0000)]
fix an uninitialized variable, patch by Michael Spencer!

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

14 years agoRemove a dead argument to ProcessUCNEscape.
Chris Lattner [Tue, 15 Jun 2010 18:06:43 +0000 (18:06 +0000)]
Remove a dead argument to ProcessUCNEscape.

Fix string concatenation to treat escapes in concatenated strings that
are wide because of other string chunks to process the escapes as wide
themselves.  Before we would warn about and miscompile the attached testcase.

This fixes rdar://8040728 - miscompile + warning: hex escape sequence out of range

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

14 years agotidy up
Chris Lattner [Tue, 15 Jun 2010 18:05:34 +0000 (18:05 +0000)]
tidy up

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

14 years agoBreak Frontend's dependency on Rewrite, Checker and CodeGen in shared library configu...
Daniel Dunbar [Tue, 15 Jun 2010 17:48:49 +0000 (17:48 +0000)]
Break Frontend's dependency on Rewrite, Checker and CodeGen in shared library configuration

Currently, all AST consumers are located in the Frontend library,
meaning that in a shared library configuration, Frontend has a
dependency on Rewrite, Checker and CodeGen.  This is suboptimal for
clients which only wish to make use of the frontend.  CodeGen in
particular introduces a large number of unwanted dependencies.

This patch breaks the dependency by moving all AST consumers with
dependencies on Rewrite, Checker and/or CodeGen to their respective
libraries.  The patch therefore introduces dependencies in the other
direction (i.e. from Rewrite, Checker and CodeGen to Frontend).

After applying this patch, Clang builds correctly using CMake and
shared libraries ("cmake -DBUILD_SHARED_LIBS=ON").

N.B. This patch includes file renames which are indicated in the
patch body.

Changes in this revision of the patch:
 - Fixed some copy-paste mistakes in the header files
 - Modified certain aspects of the coding to comply with the LLVM
   Coding Standards

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

14 years agoAllocate template parameter lists for out-of-line definitions via the
Douglas Gregor [Tue, 15 Jun 2010 17:44:38 +0000 (17:44 +0000)]
Allocate template parameter lists for out-of-line definitions via the
ASTContext rather than via the normal heap.

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

14 years agoImplement -fvisibility-inlines-hidden. <rdar://problem/7819834>
Douglas Gregor [Tue, 15 Jun 2010 17:05:35 +0000 (17:05 +0000)]
Implement -fvisibility-inlines-hidden. <rdar://problem/7819834>

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

14 years agoDriver/FreeBSD: Add libexec to program search paths, to workaround some build
Daniel Dunbar [Tue, 15 Jun 2010 15:03:31 +0000 (15:03 +0000)]
Driver/FreeBSD: Add libexec to program search paths, to workaround some build
problem; patch by Ed Schouten.

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

14 years agoAdd <cstddef> include to get ptrdiff_t, for gcc-4.6; patch by Dimitry Andric.
Daniel Dunbar [Tue, 15 Jun 2010 14:50:52 +0000 (14:50 +0000)]
Add <cstddef> include to get ptrdiff_t, for gcc-4.6; patch by Dimitry Andric.

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

14 years agoFix typo.
Benjamin Kramer [Tue, 15 Jun 2010 08:21:35 +0000 (08:21 +0000)]
Fix typo.

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

14 years agoWhen analyzing for member self-assignment, don't attempt to dereference null
Nick Lewycky [Tue, 15 Jun 2010 07:32:55 +0000 (07:32 +0000)]
When analyzing for member self-assignment, don't attempt to dereference null
Stmt* such as those which occur in ?: . Fixes PR7378.

Also, generally whip the code into shape fixing several coding style violations.

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

14 years agoMinGW requires that wint_t be defined in stddef.h. In order to accomodate, we
Sean Hunt [Tue, 15 Jun 2010 02:36:48 +0000 (02:36 +0000)]
MinGW requires that wint_t be defined in stddef.h. In order to accomodate, we
won't define it unless specifically requested via the use of __need_wint_t.

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

14 years agoChange AnalysisConsumer to analyze functions created by instantiantiating a macro...
Ted Kremenek [Tue, 15 Jun 2010 00:55:40 +0000 (00:55 +0000)]
Change AnalysisConsumer to analyze functions created by instantiantiating a macro.  Fixes PR 7361.

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

14 years agofix the inline asm diagnostics to emit the error on the primary
Chris Lattner [Tue, 15 Jun 2010 00:03:12 +0000 (00:03 +0000)]
fix the inline asm diagnostics to emit the error on the primary
source code location instead of on the note.  Previously we generated:

<inline asm>:1:2: error: unrecognized instruction
        barf
        ^
t.c:4:8: note: generated from here
  asm ("barf");
       ^

Now we generate:

t.c:4:8: error: unrecognized instruction
  asm ("barf");
       ^
<inline asm>:1:2: note: instantated into assembly here
        barf
        ^

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

14 years agoMake sure to set the visible on a vtable; VTTs and typeinfo already
Douglas Gregor [Mon, 14 Jun 2010 23:41:45 +0000 (23:41 +0000)]
Make sure to set the visible on a vtable; VTTs and typeinfo already
handle visibility properly. Fixes <rdar://problem/8091955>.

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

14 years agoAdd name mangling for address spaces. We use the vendor-extension
Douglas Gregor [Mon, 14 Jun 2010 23:15:08 +0000 (23:15 +0000)]
Add name mangling for address spaces. We use the vendor-extension
mangling for types, where the <source-name> is ASxxx (xxx is the
address-space number).

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

14 years agoWarn when a 'typename' or a 'template' keyword refers to a
Douglas Gregor [Mon, 14 Jun 2010 22:07:54 +0000 (22:07 +0000)]
Warn when a 'typename' or a 'template' keyword refers to a
non-dependent type or template name, respectively, in C++98/03. Fixes
PR7111 and <rdar://problem/8002682>.

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

14 years agoDriver: Fix PR4062 by dissecting one particular -Wp, form.
Daniel Dunbar [Mon, 14 Jun 2010 21:37:09 +0000 (21:37 +0000)]
Driver: Fix PR4062 by dissecting one particular -Wp, form.

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

14 years agoDriver: Dissect -Wl, and -Xlinker arguments to remove --no-demangle, which was a
Daniel Dunbar [Mon, 14 Jun 2010 21:23:12 +0000 (21:23 +0000)]
Driver: Dissect -Wl, and -Xlinker arguments to remove --no-demangle, which was a
collect2 option that is passed by some projects (notably WebKit).

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

14 years agoDriver: Eliminate uses of Arg::getIndex.
Daniel Dunbar [Mon, 14 Jun 2010 21:23:08 +0000 (21:23 +0000)]
Driver: Eliminate uses of Arg::getIndex.

Also, fix a memory leak.

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

14 years agoPut warnings about designated initializations overridding prior
Douglas Gregor [Mon, 14 Jun 2010 21:15:09 +0000 (21:15 +0000)]
Put warnings about designated initializations overridding prior
initializations into their own warning group, initializer-overrides,
which is part of -Wextra. Patch by william@25thandClement.com, fixes
PR6934!

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

14 years agoDriver: Fix refacto in DerivedArgList::MakeSeparateArg.
Daniel Dunbar [Mon, 14 Jun 2010 20:20:44 +0000 (20:20 +0000)]
Driver: Fix refacto in DerivedArgList::MakeSeparateArg.

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

14 years agoDriver: Add DerivedArgList::AddFOOArg helper functions, and switch to using them.
Daniel Dunbar [Mon, 14 Jun 2010 20:20:41 +0000 (20:20 +0000)]
Driver: Add DerivedArgList::AddFOOArg helper functions, and switch to using them.

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

14 years agoTeach TemplateDecl::getSourceRange() to cover the entire declaration,
Douglas Gregor [Mon, 14 Jun 2010 20:02:51 +0000 (20:02 +0000)]
Teach TemplateDecl::getSourceRange() to cover the entire declaration,
from Peter Collingbourne!

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

14 years agoFix:
Chris Lattner [Mon, 14 Jun 2010 18:31:46 +0000 (18:31 +0000)]
Fix:
Decl.cpp:716:28: warning: initialization of pointer of type 'clang::VarDecl *' from literal 'false' [-Wbool-conversions]
  VarDecl *LastTentative = false;
                           ^
RewriteRope.cpp:535:12: warning: initialization of pointer of type '<anonymous>::RopePieceBTreeNode *' from literal 'false'
      [-Wbool-conversions]
    return false;
           ^

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

14 years agoEnable basic testing of __builtin_fpclassify.
Benjamin Kramer [Mon, 14 Jun 2010 10:41:45 +0000 (10:41 +0000)]
Enable basic testing of __builtin_fpclassify.

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

14 years agoAn implementation of __builtin__fpclassify the way Chris Lattner described by Jörg...
Benjamin Kramer [Mon, 14 Jun 2010 10:30:41 +0000 (10:30 +0000)]
An implementation of __builtin__fpclassify the way Chris Lattner described by Jörg Blank.

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

14 years agoMicrosoft C++ Mangler:
Charles Davis [Mon, 14 Jun 2010 05:29:01 +0000 (05:29 +0000)]
Microsoft C++ Mangler:
- Mangle qualifiers.
- Start mangling variables' types into the name. A variable declared with a
  builtin type should now mangle properly.

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

14 years agoAdd some missing shifts
Nate Begeman [Mon, 14 Jun 2010 05:21:25 +0000 (05:21 +0000)]
Add some missing shifts
Fix multiplies by scalar
Add SemaChecking code for all immediates
Add SemaChecking-gen support to arm_neon.td

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

14 years agowww: Swap external coverage & spec references links.
Daniel Dunbar [Sun, 13 Jun 2010 21:07:10 +0000 (21:07 +0000)]
www: Swap external coverage & spec references links.

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

14 years agoDo the same short-circuit optimization when laying out bases.
Anders Carlsson [Sun, 13 Jun 2010 18:00:18 +0000 (18:00 +0000)]
Do the same short-circuit optimization when laying out bases.

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

14 years agoImplement part of the EmptySubobjectMap optimization described in PR6998. We still...
Anders Carlsson [Sun, 13 Jun 2010 17:49:16 +0000 (17:49 +0000)]
Implement part of the EmptySubobjectMap optimization described in PR6998. We still need to do this for bases.

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

14 years agoTemplateSpecializationType's isCurrentInstantiation bit can be derived
John McCall [Sun, 13 Jun 2010 09:25:03 +0000 (09:25 +0000)]
TemplateSpecializationType's isCurrentInstantiation bit can be derived
from its canonical type.

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

14 years agoAllow an asm label specifier on C++ methods, like GCC does.
Chris Lattner [Sun, 13 Jun 2010 05:34:18 +0000 (05:34 +0000)]
Allow an asm label specifier on C++ methods, like GCC does.
Patch by David Majnemer!

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

14 years agoMost of NEON sema checking & fix to polynomial type detection
Nate Begeman [Sun, 13 Jun 2010 04:47:52 +0000 (04:47 +0000)]
Most of NEON sema checking & fix to polynomial type detection

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

14 years agodon't make libclang depend on codegen. Patch by Peter Collingbourne!
Chris Lattner [Sat, 12 Jun 2010 22:54:45 +0000 (22:54 +0000)]
don't make libclang depend on codegen.  Patch by Peter Collingbourne!

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

14 years agoReally make the Itanium C++ ABI the default.
Charles Davis [Sat, 12 Jun 2010 16:58:00 +0000 (16:58 +0000)]
Really make the Itanium C++ ABI the default.

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

14 years agofix PR7360: -P mode turns off line markers, but not blank space.
Chris Lattner [Sat, 12 Jun 2010 16:20:56 +0000 (16:20 +0000)]
fix PR7360: -P mode turns off line markers, but not blank space.
Apparently some programs which abuse the preprocessor depend
on this.

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

14 years agoAdded template parameters info for out-of-line definitions of class template methods.
Abramo Bagnara [Sat, 12 Jun 2010 08:15:14 +0000 (08:15 +0000)]
Added template parameters info for out-of-line definitions of class template methods.

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

14 years agoMicrosoft C++ Mangler:
Charles Davis [Sat, 12 Jun 2010 08:11:16 +0000 (08:11 +0000)]
Microsoft C++ Mangler:
- Don't mangle static variables at global scope.
- Add support for mangling builtin types. This will be used later.

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

14 years agoDon't omit class explicit instantiation from AST.
Abramo Bagnara [Sat, 12 Jun 2010 07:44:57 +0000 (07:44 +0000)]
Don't omit class explicit instantiation from AST.

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

14 years agoShifts complete. Only vld & sema checking of constants remain.
Nate Begeman [Sat, 12 Jun 2010 06:06:07 +0000 (06:06 +0000)]
Shifts complete.  Only vld & sema checking of constants remain.

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

14 years agovbsl, vrev* is implemented via arm_neon.h
Nate Begeman [Sat, 12 Jun 2010 03:11:41 +0000 (03:11 +0000)]
vbsl, vrev* is implemented via arm_neon.h

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

14 years agoWhen deciding whether an expression has the boolean nature, don't look through
John McCall [Sat, 12 Jun 2010 01:56:02 +0000 (01:56 +0000)]
When deciding whether an expression has the boolean nature, don't look through
explicit casts.  Fixes PR7359.

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

14 years agoFix PCH issue. Attributes of a declaration were truncated to just one when the decl...
Argyrios Kyrtzidis [Fri, 11 Jun 2010 23:09:25 +0000 (23:09 +0000)]
Fix PCH issue. Attributes of a declaration were truncated to just one when the decl was read from a PCH file.

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

14 years agoMost of remaining builtins, 2 generics, vld, and rounding shfits remain.
Nate Begeman [Fri, 11 Jun 2010 22:57:12 +0000 (22:57 +0000)]
Most of remaining builtins, 2 generics, vld, and rounding shfits remain.

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

14 years agoDriver: Switch Compilation to return the translated arguments by default.
Daniel Dunbar [Fri, 11 Jun 2010 22:43:38 +0000 (22:43 +0000)]
Driver: Switch Compilation to return the translated arguments by default.

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

14 years agoadd a -W flag.
Chris Lattner [Fri, 11 Jun 2010 22:10:09 +0000 (22:10 +0000)]
add a -W flag.

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

14 years agoDriver: Add an explicit argument translation phase to the driver itself. We are going...
Daniel Dunbar [Fri, 11 Jun 2010 22:00:26 +0000 (22:00 +0000)]
Driver: Add an explicit argument translation phase to the driver itself. We are going to need this to handle things like -Xassembler, -Xpreprocessor, and -Xlinker which we might have to introspect.

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

14 years agoDriver: Get rid of the proxy support in DerivedArgList.
Daniel Dunbar [Fri, 11 Jun 2010 22:00:22 +0000 (22:00 +0000)]
Driver: Get rid of the proxy support in DerivedArgList.

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

14 years agoFix a couple comments.
Daniel Dunbar [Fri, 11 Jun 2010 22:00:19 +0000 (22:00 +0000)]
Fix a couple comments.

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

14 years agoDriver: Change OptTable::ParseArg to take any ArgList.
Daniel Dunbar [Fri, 11 Jun 2010 22:00:17 +0000 (22:00 +0000)]
Driver: Change OptTable::ParseArg to take any ArgList.

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

14 years agoDriver: Fix arg_iterator typing to reflect that it is really an iterator over Arg*s.
Daniel Dunbar [Fri, 11 Jun 2010 22:00:13 +0000 (22:00 +0000)]
Driver: Fix arg_iterator typing to reflect that it is really an iterator over Arg*s.

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

14 years agoPreprocessor: Ignore unknown pragmas in -E -dM and -Eonly modes.
Daniel Dunbar [Fri, 11 Jun 2010 20:10:12 +0000 (20:10 +0000)]
Preprocessor: Ignore unknown pragmas in -E -dM and -Eonly modes.

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

14 years agopreprocessor directives in macro arguments aren't standard,
Chris Lattner [Fri, 11 Jun 2010 19:50:37 +0000 (19:50 +0000)]
preprocessor directives in macro arguments aren't standard,
hopefully this unbreaks msvc

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

14 years agoAdd a few FIXMEs: recursing over shadow decls, and semantics vs
Craig Silverstein [Fri, 11 Jun 2010 18:08:47 +0000 (18:08 +0000)]
Add a few FIXMEs: recursing over shadow decls, and semantics vs
syntactic iterating over initializer exprs.  No functional change.

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

14 years agoFix the constant evaluator for AltiVec-style vector literals so that the
John McCall [Fri, 11 Jun 2010 17:54:15 +0000 (17:54 +0000)]
Fix the constant evaluator for AltiVec-style vector literals so that the
vector is filled with the given constant;  we were just initializing the
first element.

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