Граф коммитов

22254 Коммитов

Автор SHA1 Сообщение Дата
Douglas Gregor 2ade35e2cf 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
2010-06-16 00:17:44 +00:00
Fariborz Jahanian ff2d05f653 Workaround a possible VS C++ bug.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106070 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-16 00:16:38 +00:00
Jeffrey Yasskin 1390c3d43d 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
2010-06-15 23:50:08 +00:00
Fariborz Jahanian 2a71107b9a 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
2010-06-15 23:49:10 +00:00
Chandler Carruth 06057cef0b 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
2010-06-15 23:19:56 +00:00
Fariborz Jahanian 55bcace250 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
2010-06-15 22:44:06 +00:00
Douglas Gregor 6e5122c8ce 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
2010-06-15 21:38:40 +00:00
Chris Lattner c54539cd17 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
2010-06-15 21:06:38 +00:00
Douglas Gregor 410a1da2c8 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
2010-06-15 20:38:36 +00:00
Daniel Dunbar 212df32d95 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
2010-06-15 20:30:18 +00:00
Douglas Gregor 9b30b267e7 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
2010-06-15 20:26:51 +00:00
Chris Lattner d5ef4fa303 add a testcase, from Michael Spencer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106026 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-15 18:56:20 +00:00
Chris Lattner 90db74c361 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
2010-06-15 18:55:23 +00:00
Chris Lattner 37dd3ecbfc 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
2010-06-15 18:06:43 +00:00
Chris Lattner 7dc480fa42 tidy up
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106011 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-15 18:05:34 +00:00
Daniel Dunbar 9b414d3e2d 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
2010-06-15 17:48:49 +00:00
Douglas Gregor c722ea4fbf 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
2010-06-15 17:44:38 +00:00
Douglas Gregor 7cf84d6696 Implement -fvisibility-inlines-hidden. <rdar://problem/7819834>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106003 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-15 17:05:35 +00:00
Daniel Dunbar 7fb2c25ab0 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
2010-06-15 15:03:31 +00:00
Daniel Dunbar ea3fe7c72b 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
2010-06-15 14:50:52 +00:00
Benjamin Kramer 2f7ea3dde0 Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105993 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-15 08:21:35 +00:00
Nick Lewycky 43ad182474 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
2010-06-15 07:32:55 +00:00
Sean Hunt 88318139c9 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
2010-06-15 02:36:48 +00:00
Ted Kremenek fcd783d583 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
2010-06-15 00:55:40 +00:00
Chris Lattner 99e14a0488 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
2010-06-15 00:03:12 +00:00
Douglas Gregor c66bcfd32b 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
2010-06-14 23:41:45 +00:00
Douglas Gregor 56079f7dde 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
2010-06-14 23:15:08 +00:00
Douglas Gregor 732281de5d 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
2010-06-14 22:07:54 +00:00
Daniel Dunbar eda3f707fd 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
2010-06-14 21:37:09 +00:00
Daniel Dunbar f78925f633 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
2010-06-14 21:23:12 +00:00
Daniel Dunbar 0e10031ba5 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
2010-06-14 21:23:08 +00:00
Douglas Gregor 57dc2fc543 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
2010-06-14 21:15:09 +00:00
Daniel Dunbar fdbe65e587 Driver: Fix refacto in DerivedArgList::MakeSeparateArg.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105958 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-14 20:20:44 +00:00
Daniel Dunbar 9d0863b22f 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
2010-06-14 20:20:41 +00:00
Douglas Gregor 80484d0de0 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
2010-06-14 20:02:51 +00:00
Chris Lattner f0ed9ef428 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
2010-06-14 18:31:46 +00:00
Benjamin Kramer a6cebabcf8 Enable basic testing of __builtin_fpclassify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105937 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-14 10:41:45 +00:00
Benjamin Kramer 7867f1a62b 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
2010-06-14 10:30:41 +00:00
Charles Davis b021f8bd44 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
2010-06-14 05:29:01 +00:00
Nate Begeman 61eecf5aea 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
2010-06-14 05:21:25 +00:00
Daniel Dunbar 9fde7ca3fe www: Swap external coverage & spec references links.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105925 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-13 21:07:10 +00:00
Anders Carlsson e3362bc104 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
2010-06-13 18:00:18 +00:00
Anders Carlsson 5ccfdd8d21 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
2010-06-13 17:49:16 +00:00
John McCall 71d74bc0d6 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
2010-06-13 09:25:03 +00:00
Chris Lattner e6563256a4 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
2010-06-13 05:34:18 +00:00
Nate Begeman 0d15c5321a 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
2010-06-13 04:47:52 +00:00
Chris Lattner 746d99132b 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
2010-06-12 22:54:45 +00:00
Charles Davis b661eed4d9 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
2010-06-12 16:58:00 +00:00
Chris Lattner 6133aeb97d 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
2010-06-12 16:20:56 +00:00
Abramo Bagnara 9b9348889d 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
2010-06-12 08:15:14 +00:00