]> granicus.if.org Git - clang/log
clang
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

14 years agoAllow pseudo-destructors to be called on qualified pointers. Patch by
John McCall [Fri, 11 Jun 2010 17:36:40 +0000 (17:36 +0000)]
Allow pseudo-destructors to be called on qualified pointers.  Patch by
Troy Straszheim!

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

14 years agoDon't store ASTContext references in the TST nodes just to support profiling.
John McCall [Fri, 11 Jun 2010 11:07:21 +0000 (11:07 +0000)]
Don't store ASTContext references in the TST nodes just to support profiling.

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

14 years agoProvide an Objective C mangling for wchar_t. Patch by Nico Weber!
John McCall [Fri, 11 Jun 2010 10:11:05 +0000 (10:11 +0000)]
Provide an Objective C mangling for wchar_t.  Patch by Nico Weber!

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

14 years agoConversions from Objective C object pointers to bool are "pointer conversions
John McCall [Fri, 11 Jun 2010 10:04:22 +0000 (10:04 +0000)]
Conversions from Objective C object pointers to bool are "pointer conversions
to bool" in the sense of C++ [over.ics.rank]p4 bullet 1.  I have decreed it.

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

14 years agoFix the 64-bit build. operator<<(DiagnosticBuilder, long) doesn't exist, so
Jeffrey Yasskin [Fri, 11 Jun 2010 06:58:43 +0000 (06:58 +0000)]
Fix the 64-bit build.  operator<<(DiagnosticBuilder, long) doesn't exist, so
ptrdiff_t (long on 64-bit, apparently) is ambiguous between the int and
unsigned int overloads.

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

14 years agoAdd an option -fshow-overloads=best|all to limit the number of overload
Jeffrey Yasskin [Fri, 11 Jun 2010 05:57:47 +0000 (05:57 +0000)]
Add an option -fshow-overloads=best|all to limit the number of overload
candidates printed.  We default to 'all'.  At the moment, 'best' prints only
the first 4 overloads, but we'll improve that over time.

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

14 years agoWhen mangling for the Microsoft C++ ABI, mangle variables in the global
Charles Davis [Fri, 11 Jun 2010 04:25:47 +0000 (04:25 +0000)]
When mangling for the Microsoft C++ ABI, mangle variables in the global
namespace, too.

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

14 years agoSmall fixes regarding printf fix suggestions.
Tom Care [Fri, 11 Jun 2010 04:22:02 +0000 (04:22 +0000)]
Small fixes regarding printf fix suggestions.
- Added some handling of flags that become invalid when changing the conversion specifier.
- Changed fixit behavior to remove unnecessary length modifiers.
- Separated some tests out and added some comments.

modified:
  lib/Analysis/PrintfFormatString.cpp
  test/Sema/format-strings-fixit.c

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

14 years agoStart implementing the Microsoft-style name mangler. Mangle simple names
Charles Davis [Fri, 11 Jun 2010 03:07:32 +0000 (03:07 +0000)]
Start implementing the Microsoft-style name mangler. Mangle simple names
(but not their types; that's later).

NOTE: Right now, variables in the global namespace don't get mangled, even
though they're supposed to be. This is because the default mangler
implements the shouldMangleDeclName() method that tells clang not to mangle
them. This will be fixed in a later patch.

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

14 years agoAdd an option to specify the target C++ ABI to the frontend. Use it to
Charles Davis [Fri, 11 Jun 2010 01:06:47 +0000 (01:06 +0000)]
Add an option to specify the target C++ ABI to the frontend. Use it to
select either the default Itanium ABI or the new, experimental Microsoft ABI.

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

14 years agoImprove readability with TRY_TO, remove a redundant comment, and fix one aspect
Chandler Carruth [Fri, 11 Jun 2010 01:00:06 +0000 (01:00 +0000)]
Improve readability with TRY_TO, remove a redundant comment, and fix one aspect
of the recursion on VarDecls. Patch by Craig Silverstein.

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

14 years agoSplit DependentNameType into two types. DependentNameType represents the
John McCall [Fri, 11 Jun 2010 00:33:02 +0000 (00:33 +0000)]
Split DependentNameType into two types.  DependentNameType represents the
case of an elaborated-type-specifier like 'typename A<T>::foo', and
DependentTemplateSpecializationType represents the case of an
elaborated-type-specifier like 'typename A<T>::template B<T>'.  The TypeLoc
representation of a DependentTST conveniently exactly matches that of an
ElaboratedType wrapping a TST.

Kill off the explicit rebuild methods for RebuildInCurrentInstantiation;
the standard implementations work fine because the nested name specifier
is computable in the newly-entered context.

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

14 years agoProvide a method to clear the current state of a TypeLocBuilder.
John McCall [Fri, 11 Jun 2010 00:26:38 +0000 (00:26 +0000)]
Provide a method to clear the current state of a TypeLocBuilder.

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

14 years agoAvoid repeating the list of operators twice in RecursiveASTVisitor through
Chandler Carruth [Thu, 10 Jun 2010 23:29:40 +0000 (23:29 +0000)]
Avoid repeating the list of operators twice in RecursiveASTVisitor through
a set of preprocessor macros. Patch by Zhanyong Wan.

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

14 years agoTweak a comment on the visitor to clarify one order of visit issue. Patch from
Chandler Carruth [Thu, 10 Jun 2010 23:27:51 +0000 (23:27 +0000)]
Tweak a comment on the visitor to clarify one order of visit issue. Patch from
Zhanyong Wan.

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

14 years agoMultiplies, some shifts, set_lane
Nate Begeman [Thu, 10 Jun 2010 18:11:55 +0000 (18:11 +0000)]
Multiplies, some shifts, set_lane

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

14 years agowww: Add note on running clang tests from a CMake build, patch by Peter Collingbourne
Daniel Dunbar [Thu, 10 Jun 2010 17:01:45 +0000 (17:01 +0000)]
www: Add note on running clang tests from a CMake build, patch  by Peter Collingbourne

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

14 years agoDriver: Also mark -F as RenderJoined, the linker doesn't like "-F FOO" either.
Daniel Dunbar [Thu, 10 Jun 2010 15:53:17 +0000 (15:53 +0000)]
Driver: Also mark -F as RenderJoined, the linker doesn't like "-F FOO" either.

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

14 years agoAnother chunk of the new RecursiveASTVisitor implementation: switch the return
Chandler Carruth [Thu, 10 Jun 2010 10:31:57 +0000 (10:31 +0000)]
Another chunk of the new RecursiveASTVisitor implementation: switch the return
value semantics such that we recurse while the visitors return true, and halt
as soon as one returns false. Patch by csilvers.

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

14 years agoCreate a LinuxTargetInfo on ARM. This make clang correctly expand
Rafael Espindola [Thu, 10 Jun 2010 00:46:51 +0000 (00:46 +0000)]
Create a LinuxTargetInfo on ARM. This make clang correctly expand
__USER_LABEL_PREFIX__.

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

14 years agosupport _lane ops, and multiplies by scalar.
Nate Begeman [Thu, 10 Jun 2010 00:17:56 +0000 (00:17 +0000)]
support _lane ops, and multiplies by scalar.

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

14 years agoAdd a stub Microsoft Visual C++ ABI class (with stub mangler).
Charles Davis [Wed, 9 Jun 2010 23:25:41 +0000 (23:25 +0000)]
Add a stub Microsoft Visual C++ ABI class (with stub mangler).

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

14 years agotests: Update test for previous change.
Daniel Dunbar [Wed, 9 Jun 2010 23:24:59 +0000 (23:24 +0000)]
tests: Update test for previous change.

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

14 years agoDriver: -L should be marked as RenderJoined, the linker doesn't like "-L FOO".
Daniel Dunbar [Wed, 9 Jun 2010 23:20:37 +0000 (23:20 +0000)]
Driver: -L should be marked as RenderJoined, the linker doesn't like "-L FOO".

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

14 years agoDriver: Eliminate flags on aliases, they are unnecessary (and unused).
Daniel Dunbar [Wed, 9 Jun 2010 23:20:34 +0000 (23:20 +0000)]
Driver: Eliminate flags on aliases, they are unnecessary (and unused).

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

14 years agoDriver: Change Option parsing to always create arguments referring to unaliased
Daniel Dunbar [Wed, 9 Jun 2010 22:44:34 +0000 (22:44 +0000)]
Driver: Change Option parsing to always create arguments referring to unaliased
options.
 - This matches the intent of the .td files, and will simplify alias handling.
 - PR7321.

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

14 years agoDriver: Eliminate Arg subclasses, which are now unnecessary.
Daniel Dunbar [Wed, 9 Jun 2010 22:31:08 +0000 (22:31 +0000)]
Driver: Eliminate Arg subclasses, which are now unnecessary.

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

14 years agoDriver: Keep the rendering style in the option, instead of as part of the Arg.
Daniel Dunbar [Wed, 9 Jun 2010 22:31:04 +0000 (22:31 +0000)]
Driver: Keep the rendering style in the option, instead of as part of the Arg.

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

14 years agoDriver: Change Arg to just hold the values directly, instead of implicitly
Daniel Dunbar [Wed, 9 Jun 2010 22:31:00 +0000 (22:31 +0000)]
Driver: Change Arg to just hold the values directly, instead of implicitly
deriving them from the Arg type.

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

14 years agoFrontend: Fix crashes on error paths.
Daniel Dunbar [Wed, 9 Jun 2010 22:30:54 +0000 (22:30 +0000)]
Frontend: Fix crashes on error paths.

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

14 years agoCommit my WIP on constexpr support. This commit: an XFAILed test and treating constex...
Sebastian Redl [Wed, 9 Jun 2010 21:19:43 +0000 (21:19 +0000)]
Commit my WIP on constexpr support. This commit: an XFAILed test and treating constexpr as a top-level const.

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

14 years agoFix two typos in comments.
Sebastian Redl [Wed, 9 Jun 2010 21:17:41 +0000 (21:17 +0000)]
Fix two typos in comments.

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

14 years agoRevert "Driver: Change Option parsing to always create arguments referring to
Daniel Dunbar [Wed, 9 Jun 2010 19:27:07 +0000 (19:27 +0000)]
Revert "Driver: Change Option parsing to always create arguments referring to
unaliased", this isn't quite right yet.

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

14 years agoDriver: Change Option parsing to always create arguments referring to unaliased
Daniel Dunbar [Wed, 9 Jun 2010 19:19:01 +0000 (19:19 +0000)]
Driver: Change Option parsing to always create arguments referring to unaliased
options.
 - This matches the intent of the .td files, and will simplify alias handling.
 - PR7321.

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

14 years agoDriver: Add an explicit offset to JoinedArg and JoinedAndSeparateArg, so that
Daniel Dunbar [Wed, 9 Jun 2010 18:49:38 +0000 (18:49 +0000)]
Driver: Add an explicit offset to JoinedArg and JoinedAndSeparateArg, so that
they can be independent of the exact option that created them.

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

14 years agoDriver: Change Arg::render methods to use option name instead of string where
Daniel Dunbar [Wed, 9 Jun 2010 18:49:31 +0000 (18:49 +0000)]
Driver: Change Arg::render methods to use option name instead of string where
possible.

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