]> granicus.if.org Git - clang/log
clang
14 years agoNow that CastRetrievedVal returns SVal, there is no need to use CastResult.
Zhongxing Xu [Thu, 4 Feb 2010 02:39:47 +0000 (02:39 +0000)]
Now that CastRetrievedVal returns SVal, there is no need to use CastResult.

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

14 years agoAdd a cautionary note about the mangling I just invented.
John McCall [Thu, 4 Feb 2010 01:48:38 +0000 (01:48 +0000)]
Add a cautionary note about the mangling I just invented.

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

14 years agoAdd mangling support for calls, sizeof/alignof, constructor calls,
John McCall [Thu, 4 Feb 2010 01:42:13 +0000 (01:42 +0000)]
Add mangling support for calls, sizeof/alignof, constructor calls,
float literals, and unresolved lookups (which required hand-wavey extensions).

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

14 years agostatic analyzer: handle casts of a function to a function pointer with
Ted Kremenek [Thu, 4 Feb 2010 00:47:48 +0000 (00:47 +0000)]
static analyzer: handle casts of a function to a function pointer with
a different return type.  While we don't emit any errors (yet), at
least we avoid cases where we might crash because of an assertion
failure later on (when the return type differs from what is expected).

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

14 years agoFix rewriting of 'const' __block variables in
Fariborz Jahanian [Thu, 4 Feb 2010 00:07:58 +0000 (00:07 +0000)]
Fix rewriting of 'const' __block variables in
the rewriter. (Fixes radar 7607781).

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

14 years agoDon't try to fold DeclRefExprs that point to ParmVarDecls. This had the side-effect...
Anders Carlsson [Wed, 3 Feb 2010 21:58:41 +0000 (21:58 +0000)]
Don't try to fold DeclRefExprs that point to ParmVarDecls. This had the side-effect of always folding the expression to the default argument of the parameter. For example:

void f(int a = 10) {
  return a;
}

would always return 10, regardless of the passed in argument.

This fixes another 600 test failures. We're now down to only 137 failures!

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

14 years agoFix more rewriting of protocol-quialified 'id' type.
Fariborz Jahanian [Wed, 3 Feb 2010 21:29:28 +0000 (21:29 +0000)]
Fix more rewriting of protocol-quialified 'id' type.
(Fixes radar 7607413).

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

14 years agoIn some contexts, type declarations cannot occur. Pass this information down to Parse...
Sebastian Redl [Wed, 3 Feb 2010 21:21:43 +0000 (21:21 +0000)]
In some contexts, type declarations cannot occur. Pass this information down to ParseClassSpecifier, to make its decision easier. Fixes PR6200.

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

14 years agodon't inform comment handlers about comments in #if 0 blocks,
Chris Lattner [Wed, 3 Feb 2010 21:06:21 +0000 (21:06 +0000)]
don't inform comment handlers about comments in #if 0 blocks,
doing so invalidates the file guard optimization and is not
in the spirit of "#if 0" because it is supposed to completely
skip everything, even if it isn't lexically valid. Patch by
Abramo Bagnara!

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

14 years agoDefine two types to be "compatible" in C++ if they are the same, and
Douglas Gregor [Wed, 3 Feb 2010 21:02:30 +0000 (21:02 +0000)]
Define two types to be "compatible" in C++ if they are the same, and
remove some age-old FIXMEs and C++ workarounds within the
type-compatibility logic.

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

14 years agoDeclarators can have grouping parens. This fixes rdar://7608537.
Chris Lattner [Wed, 3 Feb 2010 20:41:24 +0000 (20:41 +0000)]
Declarators can have grouping parens.  This fixes rdar://7608537.

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

14 years agoPatch to allow reinterpret_cast on objective-c pointers.
Fariborz Jahanian [Wed, 3 Feb 2010 20:32:31 +0000 (20:32 +0000)]
Patch to allow reinterpret_cast on objective-c pointers.
(partial fix for radar 7591784).

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

14 years agoRevert "Numerous changes to selector handling:", this breaks a whole bunch of
Daniel Dunbar [Wed, 3 Feb 2010 20:11:42 +0000 (20:11 +0000)]
Revert "Numerous changes to selector handling:", this breaks a whole bunch of
working code, for no apparent reason.

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

14 years agoTop-level const changes do not make a qualification conversion. Fixes PR6089.
Sebastian Redl [Wed, 3 Feb 2010 19:36:07 +0000 (19:36 +0000)]
Top-level const changes do not make a qualification conversion. Fixes PR6089.

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

14 years agoWhen determining whether a function without a prototype is compatible
Douglas Gregor [Wed, 3 Feb 2010 19:27:29 +0000 (19:27 +0000)]
When determining whether a function without a prototype is compatible
with a function with a prototype, treat parameters of enumeration type
based on the enumeration type's promotion type.

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

14 years agoHandle reference binding in aggregate initializers. Fixes another 47 tests.
Anders Carlsson [Wed, 3 Feb 2010 19:13:55 +0000 (19:13 +0000)]
Handle reference binding in aggregate initializers. Fixes another 47 tests.

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

14 years agoAdd a band-aid fix for clang self-hosting. A better fix will follow shortly.
Anders Carlsson [Wed, 3 Feb 2010 18:54:13 +0000 (18:54 +0000)]
Add a band-aid fix for clang self-hosting. A better fix will follow shortly.

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

14 years agoFix for PR6220: compute the correct type for multicharacter literals.
Eli Friedman [Wed, 3 Feb 2010 18:21:45 +0000 (18:21 +0000)]
Fix for PR6220: compute the correct type for multicharacter literals.

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

14 years agoMore cleanup.
Anders Carlsson [Wed, 3 Feb 2010 17:33:16 +0000 (17:33 +0000)]
More cleanup.

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

14 years agoRevert the new reference binding code; I came up with a way simpler solution for...
Anders Carlsson [Wed, 3 Feb 2010 16:38:03 +0000 (16:38 +0000)]
Revert the new reference binding code; I came up with a way simpler solution for the reference binding bug that is preventing self-hosting.

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

14 years agoFirst pass at adding GC support for GNU runtime. GC ivar maps not yet constructed...
David Chisnall [Wed, 3 Feb 2010 15:59:02 +0000 (15:59 +0000)]
First pass at adding GC support for GNU runtime.  GC ivar maps not yet constructed, GC flag not set.

Please don't try using this yet - the runtime support is still very immature and your code will almost certainly crash if you do.

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

14 years agoTeach the allocation function overload handling to deal with templates, and
Chandler Carruth [Wed, 3 Feb 2010 11:02:14 +0000 (11:02 +0000)]
Teach the allocation function overload handling to deal with templates, and
prevent a crash on templates when looking for an existing declaration of the
predefined global operators. This fixes PR5918.

Added an easy test case for the overload handling, but testing the crash is
a bit trickier. Created a new test that can use multiple runs with a define to
trigger which test case is used so we can test this type of issue.

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

14 years agoFix PR6149 by looking at the qualifiers on the referred to type for non-type
Chandler Carruth [Wed, 3 Feb 2010 09:37:33 +0000 (09:37 +0000)]
Fix PR6149 by looking at the qualifiers on the referred to type for non-type
reference template arguments. Adds test cases for the cv-quals of reference
arguments.

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

14 years agoWhen a function or variable somehow depends on a type or declaration
Douglas Gregor [Wed, 3 Feb 2010 09:33:45 +0000 (09:33 +0000)]
When a function or variable somehow depends on a type or declaration
that is in an anonymous namespace, give that function or variable
internal linkage.

This change models an oddity of the C++ standard, where names declared
in an anonymous namespace have external linkage but, because anonymous
namespace are really "uniquely-named" namespaces, the names cannot be
referenced from other translation units. That means that they have
external linkage for semantic analysis, but the only sensible
implementation for code generation is to give them internal
linkage. We now model this notion via the UniqueExternalLinkage
linkage type. There are several changes here:

  - Extended NamedDecl::getLinkage() to produce UniqueExternalLinkage
    when the declaration is in an anonymous namespace.
  - Added Type::getLinkage() to determine the linkage of a type, which
    is defined as the minimum linkage of the types (when we're dealing
    with a compound type that is not a struct/class/union).
  - Extended NamedDecl::getLinkage() to consider the linkage of the
    template arguments and template parameters of function template
    specializations and class template specializations.
  - Taught code generation to rely on NamedDecl::getLinkage() when
    determining the linkage of variables and functions, also
    considering the linkage of the types of those variables and
    functions (C++ only). Map UniqueExternalLinkage to internal
    linkage, taking out the explicit checks for
    isInAnonymousNamespace().

This fixes much of PR5792, which, as discovered by Anders Carlsson, is
actually the reason behind the pass-manager assertion that causes the
majority of clang-on-clang regression test failures. With this fix,
Clang-built-Clang+LLVM passes 88% of its regression tests (up from
67%). The specific numbers are:

LLVM:
  Expected Passes    : 4006
  Expected Failures  : 32
  Unsupported Tests  : 40
  Unexpected Failures: 736

Clang:
  Expected Passes    : 1903
  Expected Failures  : 14
  Unexpected Failures: 75

Overall:
  Expected Passes    : 5909
  Expected Failures  : 46
  Unsupported Tests  : 40
  Unexpected Failures: 811

Still to do:
  - Improve testing
  - Check whether we should allow the presence of types with
  InternalLinkage (in addition to UniqueExternalLinkage) given
  variables/functions internal linkage in C++, as mentioned in
  PR5792.
  - Determine how expensive the getLinkage() calls are in practice;
  consider caching the result in NamedDecl.
  - Assess the feasibility of Chris's idea in comment #1 of PR5792.

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

14 years agoAdd FlatStore.cpp (from r95214) to CMake build. Don't forget about it! =D
Chandler Carruth [Wed, 3 Feb 2010 09:31:39 +0000 (09:31 +0000)]
Add FlatStore.cpp (from r95214) to CMake build. Don't forget about it! =D

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

14 years agoAdd skeleton of flat store manager.
Zhongxing Xu [Wed, 3 Feb 2010 09:10:32 +0000 (09:10 +0000)]
Add skeleton of flat store manager.

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

14 years agoLook through CXXExprWithTemporaries when digging out the original
Douglas Gregor [Wed, 3 Feb 2010 09:01:59 +0000 (09:01 +0000)]
Look through CXXExprWithTemporaries when digging out the original
initializer. Grrr....

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

14 years agoupdate for llvm api change.
Chris Lattner [Wed, 3 Feb 2010 05:55:22 +0000 (05:55 +0000)]
update for llvm api change.

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

14 years agoremove a big chunk of #if 0 code.
Chris Lattner [Wed, 3 Feb 2010 05:28:17 +0000 (05:28 +0000)]
remove a big chunk of #if 0 code.

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

14 years agoFix regression in RegionStore due to recent changes in
Ted Kremenek [Wed, 3 Feb 2010 04:16:00 +0000 (04:16 +0000)]
Fix regression in RegionStore due to recent changes in
RegionStoreManager::InvalidateRegions() by adjusting the worklist to
iterate over BindingKeys instead of MemRegions.  We also only need to
do the actual invalidation work on base regions, and for non-base
regions just blow away their bindings.

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

14 years agoImplement Doug's suggestion. Eliminate the Stmts pointer from CXXTryStmt and instead...
Sam Weinig [Wed, 3 Feb 2010 03:56:39 +0000 (03:56 +0000)]
Implement Doug's suggestion. Eliminate the Stmts pointer from CXXTryStmt and instead allocate the statements after the object.

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

14 years agoDriver: Add -[no-]integrated-as for clang.
Daniel Dunbar [Wed, 3 Feb 2010 03:07:56 +0000 (03:07 +0000)]
Driver: Add -[no-]integrated-as for clang.
 - Requires backend support, which only exists for i386--darwin currently.

No 'as' required:
--
ddunbar@ozzy:tmp$ cat t.c
int main() { return 42; }
ddunbar@ozzy:tmp$ clang -m32 -integrated-as t.c

ddunbar@ozzy:tmp$ ./a.out; echo $?
42
ddunbar@ozzy:tmp$
--

The random extra whitespace is how you know its working! :)

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

14 years agoRework RegionStoreManager's implementation of InvalidateRegions() to
Ted Kremenek [Wed, 3 Feb 2010 03:06:46 +0000 (03:06 +0000)]
Rework RegionStoreManager's implementation of InvalidateRegions() to
not build a subregion map and instead do a single scan of the store.
This is done by building "region clusters" that represent the
collection of regions that have the same base region.  Invalidating
any region in a cluster means that they all should get invalidated.

This change brought out a point that Zhongxing mentioned to me
offline: the flattened memory binding has issues distinguishing
between direct and default bindings.  For example, setting the default
value for an entire struct is the same as binding to the first
element.  To address this problem, I moved the binding "tag" (Direct
or Default) from BindingVal to BdingKey (and removed BindingVal
entirely).  This requires us to do double lookups in some cases; and
there is still much more cleanup that can be done.

This change produced a noticeable speedup when analyzing sqlite3 (a
reduction of 4% in running time).

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

14 years agoProvide a real fix for PR6199, reverting the old workaround. Here, we
Douglas Gregor [Wed, 3 Feb 2010 03:01:57 +0000 (03:01 +0000)]
Provide a real fix for PR6199, reverting the old workaround. Here, we
realize that CXXConstructExpr is always implicit, so we should just
return its argument (if there is only one) rather than directly
invoking the constructor.

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

14 years agoRemove the SmallVector from CXXTryStmt.
Sam Weinig [Wed, 3 Feb 2010 02:09:59 +0000 (02:09 +0000)]
Remove the SmallVector from CXXTryStmt.

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

14 years agoNumerous changes to selector handling:
David Chisnall [Wed, 3 Feb 2010 02:09:30 +0000 (02:09 +0000)]
Numerous changes to selector handling:

- Don't use GlobalAliases with non-0 GEPs (GNU runtime) - this was unsupported and LLVM will be generating errors if you do it soon.  This also simplifies the code generated by the GNU runtime a bit.

- Make GetSelector() return a constant (GNU runtime), not a load of a store of a constant.

- Recognise @selector() expressions as valid static initialisers (as GCC does).

- Add methods to GCObjCRuntime to emit selectors as constants (needed for using @selector() expressions as constants.  These need implementing for the Mac runtimes - I couldn't figure out how to do this, they seem to require a load.

- Store an ObjCMethodDecl in an ObjCSelectorExpr so that we can get at the type information for the selector.  This is needed for generating typed selectors from @selector() expressions (as GCC does).  Ideally, this information should be stored in the Selector, but that would be an invasive change.  We should eventually add checks for common uses of @selector() expressions.  Possibly adding an attribute that can be applied to method args providing the types of a selector so, for example, you'd do something like this:

- (id)performSelector: __attribute__((selector_types(id, SEL, id)))(SEL)
           withObject: (id)object;

Then, any @selector() expressions passed to the method will be check to ensure that it conforms to this signature.  We do this at run time on the GNU runtime already, but it would be nice to do it at compile time on all runtimes.

- Made @selector() expressions emit type info if available and the runtime supports it.

Someone more familiar with the Mac runtime needs to implement the GetConstantSelector() function in CGObjCMac.  This currently just assert()s.

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

14 years agoDon't do an expensive definition check where a cheap 'is this C?' check suffices.
Sebastian Redl [Wed, 3 Feb 2010 02:08:48 +0000 (02:08 +0000)]
Don't do an expensive definition check where a cheap 'is this C?' check suffices.

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

14 years agofix PR6216
Chris Lattner [Wed, 3 Feb 2010 01:45:03 +0000 (01:45 +0000)]
fix PR6216

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

14 years agoclang -cc1: Wire up -emit-obj, for emitting object files.
Daniel Dunbar [Wed, 3 Feb 2010 01:18:43 +0000 (01:18 +0000)]
clang -cc1: Wire up -emit-obj, for emitting object files.

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

14 years agoRemove abstract expression kinds from the StmtClass enum. Update a few users
John McCall [Wed, 3 Feb 2010 00:55:45 +0000 (00:55 +0000)]
Remove abstract expression kinds from the StmtClass enum.  Update a few users
appropriately.  Call out a few missing cases in the expression mangler.

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

14 years agoSimplify setting of DeclContext for @catch variable
Fariborz Jahanian [Wed, 3 Feb 2010 00:32:51 +0000 (00:32 +0000)]
Simplify setting of DeclContext for @catch variable
(per Doug's comment).

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

14 years agoImplement the lvalue-to-rvalue conversion where needed. The
Douglas Gregor [Wed, 3 Feb 2010 00:27:59 +0000 (00:27 +0000)]
Implement the lvalue-to-rvalue conversion where needed. The
lvalue-to-rvalue conversion adjusts lvalues of qualified, non-class
type to rvalue expressions of the unqualified variant of that
type. For example, given:

  const int i;
  (void)(i + 17);

the lvalue-to-rvalue conversion for the subexpression "i" will turn it
from an lvalue expression (a DeclRefExpr) with type 'const int' into
an rvalue expression with type 'int'. Both C and C++ mandate this
conversion, and somehow we've slid through without implementing it.

We now have both DefaultFunctionArrayConversion and
DefaultFunctionArrayLvalueConversion, and which gets used depends on
whether we do the lvalue-to-rvalue conversion or not. Generally, we do
the lvalue-to-rvalue conversion, but there are a few notable
exceptions:
  - the left-hand side of a '.' operator
  - the left-hand side of an assignment
  - a C++ throw expression
  - a subscript expression that's subscripting a vector

Making this change exposed two issues with blocks:
  - we were deducing const-qualified return types of non-class type
  from a block return, which doesn't fit well
  - we weren't always setting the known return type of a block when it
  was provided with the ^return-type syntax

Fixes the current Clang-on-Clang compile failure and PR6076.

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

14 years agoFix DeclContext of an objective-c @catch variable
Fariborz Jahanian [Wed, 3 Feb 2010 00:01:43 +0000 (00:01 +0000)]
Fix DeclContext of an objective-c @catch variable
declaration. Fixes radar 7590273.

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

14 years agoRemove RegionStoreSubRegionMap::iterator and RegionStoreSubRegionMap::begin_end(...
Ted Kremenek [Tue, 2 Feb 2010 22:38:47 +0000 (22:38 +0000)]
Remove RegionStoreSubRegionMap::iterator and RegionStoreSubRegionMap::begin_end().  This is a precursor to using DenseSet to represent region sets instead of ImmutableSet.

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

14 years agoExplicitly check for casts to double or complex types instead of possibly asserting...
Ted Kremenek [Tue, 2 Feb 2010 21:11:40 +0000 (21:11 +0000)]
Explicitly check for casts to double or complex types instead of possibly asserting in SValuator.

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

14 years agoupdate for llvm api changes.
Chris Lattner [Tue, 2 Feb 2010 21:06:50 +0000 (21:06 +0000)]
update for llvm api changes.

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

14 years agoImplement promotion for enumeration types.
Douglas Gregor [Tue, 2 Feb 2010 20:10:50 +0000 (20:10 +0000)]
Implement promotion for enumeration types.

WHAT!?!

It turns out that Type::isPromotableIntegerType() was not considering
enumeration types to be promotable, so we would never do the
promotion despite having properly computed the promotion type when the
enum was defined. Various operations on values of enum type just
"worked" because we could still compute the integer rank of an enum
type; the oddity, however, is that operations such as "add an enum and
an unsigned" would often have an enum result type (!). The bug
actually showed up as a spurious -Wformat diagnostic
(<rdar://problem/7595366>), but in theory it could cause miscompiles.

In this commit:
  - Enum types with a promotion type of "int" or "unsigned int" are
  promotable.
  - Tweaked the computation of promotable types for enums
  - For all of the ABIs, treat enum types the same way as their
  underlying types (*not* their promotion types) for argument passing
  and return values
  - Extend the ABI tester with support for enumeration types

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

14 years agoSet the correct vtable pointers _before_ generating code for any member initializers...
Anders Carlsson [Tue, 2 Feb 2010 19:58:43 +0000 (19:58 +0000)]
Set the correct vtable pointers _before_ generating code for any member initializers. Fixes about ~2000 clang/LLVM tests in the clang-on-clang build.

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

14 years agoupdate for llvm api change.
Chris Lattner [Tue, 2 Feb 2010 19:14:34 +0000 (19:14 +0000)]
update for llvm api change.

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

14 years agoFix test.
Anders Carlsson [Tue, 2 Feb 2010 19:09:34 +0000 (19:09 +0000)]
Fix test.

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

14 years agoDump the constructor type for a CXXConstructExpr.
John McCall [Tue, 2 Feb 2010 19:03:45 +0000 (19:03 +0000)]
Dump the constructor type for a CXXConstructExpr.

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

14 years agoFix this comment.
John McCall [Tue, 2 Feb 2010 19:02:38 +0000 (19:02 +0000)]
Fix this comment.

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

14 years agoCheck for redefinitions in MergeVarDecl. This finds redefinitions of globals without...
Sebastian Redl [Tue, 2 Feb 2010 18:35:11 +0000 (18:35 +0000)]
Check for redefinitions in MergeVarDecl. This finds redefinitions of globals without an initializer in C++ and thus fixes PR5451.

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

14 years agoFix up rewriting of protocol qualified types in objc rewriter.
Fariborz Jahanian [Tue, 2 Feb 2010 18:35:07 +0000 (18:35 +0000)]
Fix up rewriting of protocol qualified types in objc rewriter.
Fixes radar 7589414.

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

14 years agoFix a C++ regression where redefinitions weren't diagnosed.
Sebastian Redl [Tue, 2 Feb 2010 17:55:12 +0000 (17:55 +0000)]
Fix a C++ regression where redefinitions weren't diagnosed.

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

14 years agoInclude <stdlib.h>, so that we're sure to get atoi.
Douglas Gregor [Tue, 2 Feb 2010 17:49:52 +0000 (17:49 +0000)]
Include <stdlib.h>, so that we're sure to get atoi.

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

14 years agothe declspec of a declaration can have storage-class specifiers,
Chris Lattner [Tue, 2 Feb 2010 17:32:27 +0000 (17:32 +0000)]
the declspec of a declaration can have storage-class specifiers,
type qualifiers and type specifiers in any order.   For example,
this is valid: struct x {...} typedef y;

This fixes PR6208.

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

14 years agoDriver/Darwin: Don't error/warn on conflicting deployment targets. Apparently
Daniel Dunbar [Tue, 2 Feb 2010 17:31:12 +0000 (17:31 +0000)]
Driver/Darwin: Don't error/warn on conflicting deployment targets. Apparently
this is still a popular thing to do.

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

14 years agoUse the Arg variable rather than re-computing it. This also silences GCC's
Chandler Carruth [Tue, 2 Feb 2010 12:15:55 +0000 (12:15 +0000)]
Use the Arg variable rather than re-computing it. This also silences GCC's
unused variable warning.

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

14 years agoMark dtors for parameter variables and eliminate some redundant type munging.
John McCall [Tue, 2 Feb 2010 09:10:11 +0000 (09:10 +0000)]
Mark dtors for parameter variables and eliminate some redundant type munging.

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

14 years agoAccess control for implicit destructor calls. Diagnostic could be orders of
John McCall [Tue, 2 Feb 2010 08:45:54 +0000 (08:45 +0000)]
Access control for implicit destructor calls.  Diagnostic could be orders of
magnitude clearer.

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

14 years agoCodegen CXXConstructExprs with trivial constructors as constants.
John McCall [Tue, 2 Feb 2010 08:02:49 +0000 (08:02 +0000)]
Codegen CXXConstructExprs with trivial constructors as constants.
Eliminates a lot of spurious global initializers, fixing PR6205.

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

14 years agoCheck in a test case and a nasty workaround for PR6199.
Anders Carlsson [Tue, 2 Feb 2010 07:10:35 +0000 (07:10 +0000)]
Check in a test case and a nasty workaround for PR6199.

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

14 years agoExtract a common base class between UnresolvedLookupExpr and
John McCall [Tue, 2 Feb 2010 06:20:04 +0000 (06:20 +0000)]
Extract a common base class between UnresolvedLookupExpr and
UnresolvedMemberExpr and employ it in a few places where it's useful.

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

14 years agoXFAIL two tests on Win32 until some cares to investigate... the problem on
Daniel Dunbar [Tue, 2 Feb 2010 05:41:30 +0000 (05:41 +0000)]
XFAIL two tests on Win32 until some cares to investigate... the problem on
dyncast is just due to \r\n newline interaction w/ regexps. The remap-load.c
failure is a bit stranger (the end of the extent is on the next line), but I
don't care to investigate.

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

14 years agothis is reasonably complete by now.
Chris Lattner [Tue, 2 Feb 2010 05:23:01 +0000 (05:23 +0000)]
this is reasonably complete by now.

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

14 years agoCIndex: Use 'env' instead of relying on bash environment-variable setting
Daniel Dunbar [Tue, 2 Feb 2010 05:20:37 +0000 (05:20 +0000)]
CIndex: Use 'env' instead of relying on bash environment-variable setting
syntax.

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

14 years agoCIndex: Respect TMPDIR/TEMP/TMP when making temporary files for remapping. As a
Daniel Dunbar [Tue, 2 Feb 2010 05:19:57 +0000 (05:19 +0000)]
CIndex: Respect TMPDIR/TEMP/TMP when making temporary files for remapping. As a
side effect, this also fixes some cases on Windows where the file would end up
on a different drive, because tmpnam doesn't include the drive component. PR3837
strikes again.

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

14 years agoImprove handling of emitting 'null' pointers to data members.
Anders Carlsson [Tue, 2 Feb 2010 05:17:25 +0000 (05:17 +0000)]
Improve handling of emitting 'null' pointers to data members.

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

14 years agoCIndex: Fix a crash in clang_createTranslationUnitFromSourceFile when using
Daniel Dunbar [Tue, 2 Feb 2010 05:00:22 +0000 (05:00 +0000)]
CIndex: Fix a crash in clang_createTranslationUnitFromSourceFile when using
external ASTs, and the ASTUnit fails to load.

Also, move getLocationFromExpr outside extern "C" block.

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

14 years agoMove pointer to data member emission to CodeGenModule and use it in CGExprConstant...
Anders Carlsson [Tue, 2 Feb 2010 03:37:46 +0000 (03:37 +0000)]
Move pointer to data member emission to CodeGenModule and use it in CGExprConstant. Fixes PR5674.

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

14 years agoMerge a test into pointers-to-data-members.cpp and convert it to FileCheck.
Anders Carlsson [Tue, 2 Feb 2010 03:32:35 +0000 (03:32 +0000)]
Merge a test into pointers-to-data-members.cpp and convert it to FileCheck.

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

14 years agoRename a test.
Anders Carlsson [Tue, 2 Feb 2010 03:23:38 +0000 (03:23 +0000)]
Rename a test.

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

14 years agoFIXME complete.
John McCall [Tue, 2 Feb 2010 03:10:28 +0000 (03:10 +0000)]
FIXME complete.

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

14 years agoImprove the diagnostic used when an incompatible overload set is passed
John McCall [Tue, 2 Feb 2010 02:42:52 +0000 (02:42 +0000)]
Improve the diagnostic used when an incompatible overload set is passed
as an argument during overload resolution.

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

14 years agoImplement C++ [temp.deduct.call]p6, template argument deduction for overloaded
John McCall [Tue, 2 Feb 2010 02:21:27 +0000 (02:21 +0000)]
Implement C++ [temp.deduct.call]p6, template argument deduction for overloaded
arguments.  Fix a bug where incomplete explicit specializations were being
passed through as legitimate.  Fix a bug where the absence of an explicit
specialization in an overload set was causing overall deduction to fail.

Fixes PR6191.

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

14 years agoAdd a stop gap to Sema::CorrectTypo() to correct only up to 20 typos.
Ted Kremenek [Tue, 2 Feb 2010 02:07:01 +0000 (02:07 +0000)]
Add a stop gap to Sema::CorrectTypo() to correct only up to 20 typos.
This is to address a serious performance problem observed when running
'clang -fsyntax-only' on really broken source files.  In one case,
repeatedly calling CorrectTypo() caused one source file to be rejected
after 2 minutes instead of 1 second.

This patch causes typo correction to take neglible time on that file
while still providing correction results for the first 20 cases.  I
felt this was a reasonable number for moderately broken source files.

I don't claim this is the best solution.  Comments welcome.  It is
necessary for us to address this issue because it is a serious
performance problem.

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

14 years agoFix bug in GRExprEngine::VisitSizeOfAlignOfExpr() where we do not add
Ted Kremenek [Tue, 2 Feb 2010 02:01:51 +0000 (02:01 +0000)]
Fix bug in GRExprEngine::VisitSizeOfAlignOfExpr() where we do not add
'Pred' to 'Dst' for cases we currently don't handle.  This fixes
<rdar://problem/7593875>.

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

14 years agoadd another example.
Chris Lattner [Tue, 2 Feb 2010 01:35:23 +0000 (01:35 +0000)]
add another example.

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

14 years agoImplement PR6180, substantially improving the diagnostics we get from
Chris Lattner [Tue, 2 Feb 2010 01:23:29 +0000 (01:23 +0000)]
Implement PR6180, substantially improving the diagnostics we get from
forgetting a ';' at the end of a struct.  For something like:

class c {
}
void foo() {}

we now produce:

t.cc:3:2: error: expected ';' after class
}
 ^
 ;

instead of:

t.cc:4:1: error: cannot combine with previous 'class' declaration specifier
void foo() {}
^
t.cc:2:7: error: 'class c' can not be defined in the result type of a function
class c {
      ^

GCC produces:

t.cc:4: error: new types may not be defined in a return type
t.cc:4: note: (perhaps a semicolon is missing after the definition of ‘c’)
t.cc:4: error: two or more data types in declaration of ‘foo’

I *think* I got the follow set right, but if I forgot anything, we'll start
getting spurious "expected ';' after class" errors, let me know if you see
any.

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

14 years agoimprove diagnostics for C++ struct ; issues. Before:
Chris Lattner [Tue, 2 Feb 2010 00:43:15 +0000 (00:43 +0000)]
improve diagnostics for C++ struct ; issues.  Before:

t.cc:4:3: error: expected ';' at end of declaration list
  int y;
  ^
t.cc:6:1: error: expected ';' at end of declaration list
};
^

After:

t.cc:3:8: error: expected ';' at end of declaration list
  int x
       ^
       ;
t.cc:5:8: error: expected ';' at end of declaration list
  int z
       ^
       ;

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

14 years agoimprove diagnostics on missing ; in a struct. Before:
Chris Lattner [Tue, 2 Feb 2010 00:37:27 +0000 (00:37 +0000)]
improve diagnostics on missing ; in a struct.  Before:

t.c:4:3: error: expected ';' at end of declaration list
  int y;
  ^
t.c:4:8: warning: extra ';' inside a struct or union
  int y;
       ^
t.c:6:1: warning: expected ';' at end of declaration list
};
^

After:

t.c:3:8: error: expected ';' at end of declaration list
  int x  // expected-error {{expected ';' at end of declaration list}}
       ^
       ;
t.c:5:8: warning: expected ';' at end of declaration list
  int z
       ^
       ;

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

14 years agoHoist diagnostic generation in ReturnStackAddressChecker into a separate method....
Ted Kremenek [Tue, 2 Feb 2010 00:13:41 +0000 (00:13 +0000)]
Hoist diagnostic generation in ReturnStackAddressChecker into a separate method.  No functionality change.

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

14 years agoMake this fix-it test case actually fail when there is a problem; add
Douglas Gregor [Mon, 1 Feb 2010 23:46:27 +0000 (23:46 +0000)]
Make this fix-it test case actually fail when there is a problem; add
a test for access declarations and remove a (broken) test for removal
of default arguments.

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

14 years agoImprove handling of enumerator values for C and C++, including:
Douglas Gregor [Mon, 1 Feb 2010 23:36:03 +0000 (23:36 +0000)]
Improve handling of enumerator values for C and C++, including:

  - In C++, prior to the closing '}', set the type of enumerators
    based on the type of their initializer. Don't perform unary
    conversions on the enumerator values.
  - In C++, handle overflow when an enumerator has no initializer and
    its value cannot be represented in the type of the previous
    enumerator.
  - In C, handle overflow more gracefully, by complaining and then
    falling back to the C++ rules.
  - In C, if the enumerator value is representable in an int, convert the
    expression to the type 'int'.

Fixes PR5854 and PR4515.

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

14 years agoARM/APCS: Fix classification of small complex integer types as "integer like".
Daniel Dunbar [Mon, 1 Feb 2010 23:31:26 +0000 (23:31 +0000)]
ARM/APCS: Fix classification of small complex integer types as "integer like".

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

14 years agoARM/APCS: Pass Complex types following llvm-gcc.
Daniel Dunbar [Mon, 1 Feb 2010 23:31:19 +0000 (23:31 +0000)]
ARM/APCS: Pass Complex types following llvm-gcc.

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

14 years agoAdd format string type checking support for 'long double'.
Ted Kremenek [Mon, 1 Feb 2010 23:23:50 +0000 (23:23 +0000)]
Add format string type checking support for 'long double'.

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

14 years agoFix FIXME and surrounding comment.
Devang Patel [Mon, 1 Feb 2010 22:51:29 +0000 (22:51 +0000)]
Fix FIXME and surrounding comment.

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

14 years agoUse appropriate context descriptor in RecordDecl's debug info.
Devang Patel [Mon, 1 Feb 2010 22:40:08 +0000 (22:40 +0000)]
Use appropriate context descriptor in RecordDecl's debug info.

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

14 years agoDo not use clang type name to name a local variable, e.g. Decl.
Devang Patel [Mon, 1 Feb 2010 21:52:22 +0000 (21:52 +0000)]
Do not use clang type name to name a local variable, e.g. Decl.

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

14 years agoDo not use clang type name to name a local variable, e.g. Decl.
Devang Patel [Mon, 1 Feb 2010 21:39:52 +0000 (21:39 +0000)]
Do not use clang type name to name a local variable, e.g. Decl.

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

14 years agoUse DeclContext as getContextDescriptor() argument.
Devang Patel [Mon, 1 Feb 2010 21:34:11 +0000 (21:34 +0000)]
Use DeclContext as getContextDescriptor() argument.

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

14 years agoDriver/Darwin: Darwin uses -fobjc-legacy-dispatch on ARM.
Daniel Dunbar [Mon, 1 Feb 2010 21:07:43 +0000 (21:07 +0000)]
Driver/Darwin: Darwin uses -fobjc-legacy-dispatch on ARM.

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

14 years agoNeXT: Add support for -fobjc-legacy-dispatch.
Daniel Dunbar [Mon, 1 Feb 2010 21:07:33 +0000 (21:07 +0000)]
NeXT: Add support for -fobjc-legacy-dispatch.

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

14 years agoDriver/Frontend: Add support for -fobjc-legacy-dispatch, not yet used.
Daniel Dunbar [Mon, 1 Feb 2010 21:07:25 +0000 (21:07 +0000)]
Driver/Frontend: Add support for -fobjc-legacy-dispatch, not yet used.

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

14 years agoDon't explicitly force utf strings into the __TEXT,__ustring
Chris Lattner [Mon, 1 Feb 2010 20:59:08 +0000 (20:59 +0000)]
Don't explicitly force utf strings into the __TEXT,__ustring
by setting the section of the generated global.  This is an
optimization done by the code generator, and the code being
removed didn't handle the case when the string contained an
embedded nul (which the code generator does correctly
handle).  This is rdar://7589850

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

14 years agoIn C++, an initializer on a variable doesn't necessarily mean it's the definition...
Sebastian Redl [Mon, 1 Feb 2010 20:16:42 +0000 (20:16 +0000)]
In C++, an initializer on a variable doesn't necessarily mean it's the definition. With that in mind, rename getDefinition to getAnyInitializer (to distinguish it from getInit) and reimplement it in terms of isThisDeclarationADefinition. Update all code to use this new function.

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

14 years agofix PR6187: various load functions in xmmintrin.h were missing 'const'.
Chris Lattner [Mon, 1 Feb 2010 20:14:14 +0000 (20:14 +0000)]
fix PR6187: various load functions in xmmintrin.h were missing 'const'.
emmintrin looks ok.

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

14 years agoUse early return as suggested by Cristian Draghici.
Ted Kremenek [Mon, 1 Feb 2010 19:38:10 +0000 (19:38 +0000)]
Use early return as suggested by Cristian Draghici.

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