]> granicus.if.org Git - clang/log
clang
11 years agoRecognize < and > as binary expressions in builder-type calls.
Daniel Jasper [Fri, 15 Feb 2013 20:33:06 +0000 (20:33 +0000)]
Recognize < and > as binary expressions in builder-type calls.

The current heuristic assumes that there can't be binary operators in
builder-type calls (excluding assigments). However, it also excluded
< and > in general, which is wrong. Now they are only excluded if they
are template parameters.

Before:
return aaaaaaaaaaaaaaaaa->aaaaa().aaaaaaaaaaaaa()i
       .aaaaaa() < aaaaaaaaaaaaaaaaaaa->aaaaa().aaaaaaaaaaaaa().aaaaaa();

After:
return aaaaaaaaaaaaaaaaa->aaaaa().aaaaaaaaaaaaa().aaaaaa() <
       aaaaaaaaaaaaaaaaaaa->aaaaa().aaaaaaaaaaaaa().aaaaaa();

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

11 years agoFixed diagnostic nondeterministic order bug (pr14901).
Enea Zaffanella [Fri, 15 Feb 2013 20:09:55 +0000 (20:09 +0000)]
Fixed diagnostic nondeterministic order bug (pr14901).

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

11 years agoDone break between 'operator' and '<<'.
Daniel Jasper [Fri, 15 Feb 2013 19:24:08 +0000 (19:24 +0000)]
Done break between 'operator' and '<<'.

Before:
ostream &operator
    <<(ostream &out, some::ns::SomeReallyLongType WithSomeReallyLongValue);

After:
ostream &operator<<(ostream &out,
                    some::ns::SomeReallyLongType WithSomeReallyLongValue);

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

11 years agoFix crash-on-invalid where a ParenListExpr shows up as a message receiver
Argyrios Kyrtzidis [Fri, 15 Feb 2013 18:34:15 +0000 (18:34 +0000)]
Fix crash-on-invalid where a ParenListExpr shows up as a message receiver
while trying to do error recovery.

rdar://13207886

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

11 years agoWhen a statement is dropped from the AST because it was invalid, make sure
Argyrios Kyrtzidis [Fri, 15 Feb 2013 18:34:13 +0000 (18:34 +0000)]
When a statement is dropped from the AST because it was invalid, make sure
we don't do the scope checks otherwise we are going to hit assertion checks
since a label may not have been actually added.

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

11 years agoRe-enable ConstructorInitializerAllOnOneLineOrOnePerLine option.
Daniel Jasper [Fri, 15 Feb 2013 16:49:44 +0000 (16:49 +0000)]
Re-enable ConstructorInitializerAllOnOneLineOrOnePerLine option.

This got lost and was untested as the same effect is achieved by
avoiding bin packing, which is active in Google style by default.
However, moving forward, we want more control over the bin packing
option(s) and thus, this flag should work as expected.

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

11 years agoSema: Unnest early exit and remove an unnecessary bad cast.
Benjamin Kramer [Fri, 15 Feb 2013 15:17:50 +0000 (15:17 +0000)]
Sema: Unnest early exit and remove an unnecessary bad cast.

cast<ObjCObjectPointerType> doesn't look through sugar, getAs does.
Fixes PR15257.

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

11 years agoAbstract out emitting the vdtor calls and do it properly when using -cxx-abi microsof...
Timur Iskhodzhanov [Fri, 15 Feb 2013 14:45:22 +0000 (14:45 +0000)]
Abstract out emitting the vdtor calls and do it properly when using -cxx-abi microsoft; also fix vdtor calls for the ARM ABI

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

11 years agoMake helper functions static.
Benjamin Kramer [Fri, 15 Feb 2013 12:30:38 +0000 (12:30 +0000)]
Make helper functions static.

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

11 years agoPrevent only breaking before "?" in conditional expressions.
Daniel Jasper [Fri, 15 Feb 2013 11:07:25 +0000 (11:07 +0000)]
Prevent only breaking before "?" in conditional expressions.

This is almost always more readable.

Before:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    ? aaaaaaaaaaaaaaaaaaaaaaaaaaa : aaaaaaaaaaaaaaaaaaaaaaaaaaa;

After:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    ? aaaaaaaaaaaaaaaaaaaaaaaaaaa
    : aaaaaaaaaaaaaaaaaaaaaaaaaaa;

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

11 years agoUpdate testcases due to Attribute sorting improvements.
Bill Wendling [Fri, 15 Feb 2013 05:25:49 +0000 (05:25 +0000)]
Update testcases due to Attribute sorting improvements.

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

11 years ago[analyzer] Don't assert when mixing reinterpret_cast and derived-to-base casts.
Jordan Rose [Fri, 15 Feb 2013 01:23:24 +0000 (01:23 +0000)]
[analyzer] Don't assert when mixing reinterpret_cast and derived-to-base casts.

This just adds a very simple check that if a DerivedToBase CastExpr is
operating on a value with known C++ object type, and that type is not the
base type specified in the AST, then the cast is invalid and we should
return UnknownVal.

In the future, perhaps we can have a checker that specifies that this is
illegal, but we still shouldn't assert even if the user turns that checker
off.

PR14872

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

11 years agoRe-apply "[analyzer] Model trivial copy/move ctors with an aggregate bind."
Jordan Rose [Fri, 15 Feb 2013 00:32:15 +0000 (00:32 +0000)]
Re-apply "[analyzer] Model trivial copy/move ctors with an aggregate bind."

...after a host of optimizations related to the use of LazyCompoundVals
(our implementation of aggregate binds).

Originally applied in r173951.
Reverted in r174069 because it was causing hangs.
Re-applied in r174212.
Reverted in r174265 because it was /still/ causing hangs.

If this needs to be reverted again it will be punted to far in the future.

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

11 years ago[analyzer] Cache the bindings accessible through a LazyCompoundVal.
Jordan Rose [Fri, 15 Feb 2013 00:32:12 +0000 (00:32 +0000)]
[analyzer] Cache the bindings accessible through a LazyCompoundVal.

This means we don't have to recompute them all later for every
removeDeadSymbols check.

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

11 years ago[analyzer] Scan the correct store when finding symbols in a LazyCompoundVal.
Jordan Rose [Fri, 15 Feb 2013 00:32:10 +0000 (00:32 +0000)]
[analyzer] Scan the correct store when finding symbols in a LazyCompoundVal.

Previously, we were scanning the current store. Now, we properly scan the
store that the LazyCompoundVal came from, which may have very different
live symbols.

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

11 years ago[analyzer] Tweak LazyCompoundVal reuse check to ignore qualifiers.
Jordan Rose [Fri, 15 Feb 2013 00:32:08 +0000 (00:32 +0000)]
[analyzer] Tweak LazyCompoundVal reuse check to ignore qualifiers.

This is optimization only; no behavioral change.

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

11 years ago[analyzer] Use collectSubRegionKeys to make removeDeadBindings faster.
Jordan Rose [Fri, 15 Feb 2013 00:32:06 +0000 (00:32 +0000)]
[analyzer] Use collectSubRegionKeys to make removeDeadBindings faster.

Previously, whenever we had a LazyCompoundVal, we crawled through the
entire store snapshot looking for bindings within the LCV's region. Now, we
just ask for the subregion bindings of the lazy region and only visit those.

This is an optimization (so no test case), but it may allow us to clean up
more dead bindings than we were previously.

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

11 years ago[analyzer] Refactor RegionStore's sub-region bindings traversal.
Jordan Rose [Fri, 15 Feb 2013 00:32:03 +0000 (00:32 +0000)]
[analyzer] Refactor RegionStore's sub-region bindings traversal.

This is going to be used in the next commit.
While I'm here, tighten up assumptions about symbolic offset
BindingKeys, and make offset calculation explicitly handle all
MemRegion kinds.

No functionality change.

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

11 years agoMake this test determinstic for my last patch.
Fariborz Jahanian [Thu, 14 Feb 2013 22:38:41 +0000 (22:38 +0000)]
Make this test determinstic for my last patch.
// rdar://13192366

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

11 years agoobjective-C: synthesize properties in order of their
Fariborz Jahanian [Thu, 14 Feb 2013 22:33:34 +0000 (22:33 +0000)]
objective-C: synthesize properties in order of their
declarations to synthesize their ivars in similar
determinstic order so they are laid out in
a determinstic order. // rdar://13192366

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

11 years agolibclang: remove reinterpret_casts by using SourceLocation::getFromPtrEncoding
Dmitri Gribenko [Thu, 14 Feb 2013 20:07:36 +0000 (20:07 +0000)]
libclang: remove reinterpret_casts by using SourceLocation::getFromPtrEncoding
directly instead of casting a pointer to an integer

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

11 years agoobjective-C: When implementing custom accessor method for
Fariborz Jahanian [Thu, 14 Feb 2013 19:07:19 +0000 (19:07 +0000)]
objective-C: When implementing custom accessor method for
a property, the -Wdirect-ivar-access should not warn when
accessing the property's synthesized instance variable.
// rdar://13142820

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

11 years ago[analyzer] Try constant-evaluation for all variables, not just globals.
Jordan Rose [Thu, 14 Feb 2013 19:06:11 +0000 (19:06 +0000)]
[analyzer] Try constant-evaluation for all variables, not just globals.

In C++, constants captured by lambdas (and blocks) are not actually stored
in the closure object, since they can be expanded at compile time. In this
case, they will have no binding when we go to look them up. Previously,
RegionStore thought they were uninitialized stack variables; now, it checks
to see if they are a constant we know how to evaluate, using the same logic
as r175026.

This particular code path is only for scalar variables. Constant arrays and
structs are still unfortunately unhandled; we'll need a stronger solution
for those.

This may have a small performance impact, but only for truly-undefined
local variables, captures in a non-inlined block, and non-constant globals.
Even then, in the non-constant case we're only doing a quick type check.

<rdar://problem/13105553>

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

11 years ago[arcmt] Make sure the function has an associated parameter for the argument
Argyrios Kyrtzidis [Thu, 14 Feb 2013 17:29:16 +0000 (17:29 +0000)]
[arcmt] Make sure the function has an associated parameter for the argument
before checking for its attributes.

rdar://13192395

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

11 years agoMangle extern "C" functions whose names are not simple identifiers.
Rafael Espindola [Thu, 14 Feb 2013 15:38:59 +0000 (15:38 +0000)]
Mangle extern "C" functions whose names are not simple identifiers.

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

11 years agoFix counting of parameters so that r175162 works as expected.
Daniel Jasper [Thu, 14 Feb 2013 15:01:34 +0000 (15:01 +0000)]
Fix counting of parameters so that r175162 works as expected.

Before:
aaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()
                              .aaaaaaaaaaaaaaaaa());

After:
aaaaaaaaaaaaaaaaaaaaaaaaa(
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa().aaaaaaaaaaaaaaaaa());

Not sure which of the formattings above is better, but we should not pick
one by accident.

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

11 years agoReduce penalty for breaking before ./-> after complex calls.
Daniel Jasper [Thu, 14 Feb 2013 14:26:07 +0000 (14:26 +0000)]
Reduce penalty for breaking before ./-> after complex calls.

This gives a clearer separation of the context, e.g. in GMOCK
statements.

Before:
EXPECT_CALL(SomeObject,
            SomeFunction(Parameter)).WillRepeatedly(Return(SomeValue));

After:
EXPECT_CALL(SomeObject, SomeFunction(Parameter))
    .WillRepeatedly(Return(SomeValue));

Minor format cleanups.

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

11 years agoRemove a const_cast by propagating constness to called functions
Dmitri Gribenko [Thu, 14 Feb 2013 13:53:30 +0000 (13:53 +0000)]
Remove a const_cast by propagating constness to called functions

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

11 years agoRemove an unneeded const_cast
Dmitri Gribenko [Thu, 14 Feb 2013 13:49:48 +0000 (13:49 +0000)]
Remove an unneeded const_cast

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

11 years agoRemove const_casts by making spec_begin()/spec_end() const
Dmitri Gribenko [Thu, 14 Feb 2013 13:20:36 +0000 (13:20 +0000)]
Remove const_casts by making spec_begin()/spec_end() const

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

11 years agoRemove the trailing whitespace of formatted lines.
Daniel Jasper [Thu, 14 Feb 2013 09:58:41 +0000 (09:58 +0000)]
Remove the trailing whitespace of formatted lines.

So far, clang-format has always assumed the whitespace belonging to the
subsequent token. This has the negative side-effect that when
clang-format formats a line, it does not remove its trailing whitespace,
as it belongs to the next token.

Thus, this patch fixes most of llvm.org/PR15062.

We are not zapping a file's trailing whitespace so far, as this does not
belong to any token we see during formatting. We need to fix this in a
subsequent patch.

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

11 years agoGet less confused by trailing comma in Google style.
Daniel Jasper [Thu, 14 Feb 2013 09:19:04 +0000 (09:19 +0000)]
Get less confused by trailing comma in Google style.

The formatter can now format:
void aaaaaaaaaaaaaaaaaa(int level,
                        double *min_x,
                        double *max_x,
                        double *min_y,
                        double *max_y,
                        double *min_z,
                        double *max_z, ) {
}

Although this is invalid code, it frequently happens during development and
clang-format should be nicer :-).

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

11 years agoRemove accidentally committed empty test.
Daniel Jasper [Thu, 14 Feb 2013 08:45:14 +0000 (08:45 +0000)]
Remove accidentally committed empty test.

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

11 years agoAlign superclasses for multiple inheritence.
Daniel Jasper [Thu, 14 Feb 2013 08:42:54 +0000 (08:42 +0000)]
Align superclasses for multiple inheritence.

This fixes llvm.org/PR15179.

Before:
class ColorChooserMac : public content::ColorChooser,
    public content::WebContentsObserver {
};

After:
class ColorChooserMac : public content::ColorChooser,
                        public content::WebContentsObserver {
};

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

11 years agoRevert accidental commit.
Bill Wendling [Thu, 14 Feb 2013 08:18:53 +0000 (08:18 +0000)]
Revert accidental commit.

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

11 years agoPass the target options through to code generation.
Bill Wendling [Thu, 14 Feb 2013 08:09:20 +0000 (08:09 +0000)]
Pass the target options through to code generation.

The code generation stuff is going to set attributes on the functions it
generates. To do that it needs the target options. Pass them through.

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

11 years agoPartially revert r175117 so that we don't break assumptions about how
Rafael Espindola [Thu, 14 Feb 2013 03:31:26 +0000 (03:31 +0000)]
Partially revert r175117 so that we don't break assumptions about how
static functions in extern "C" contexts are mangled. Should fix the
bootstrap.

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

11 years agomerge hasCLanguageLinkage and isExternC. Keep the shorter name.
Rafael Espindola [Thu, 14 Feb 2013 01:47:04 +0000 (01:47 +0000)]
merge hasCLanguageLinkage and isExternC. Keep the shorter name.

I added hasCLanguageLinkage while fixing some language linkage bugs some
time ago so that I wouldn't have to check all users of isExternC. It turned
out to be a much longer detour than expected, but this patch finally
merges the two again. The isExternC function now implements just the
standard notion of having C language linkage.

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

11 years agoAdd a getLanguageLinkage method to VarDecls and FunctionDecls. Use it to fix
Rafael Espindola [Thu, 14 Feb 2013 01:18:37 +0000 (01:18 +0000)]
Add a getLanguageLinkage method to VarDecls and FunctionDecls. Use it to fix
some cases where functions with no language linkage were being treated as having
C language linkage. In particular, don't warn in

extern "C" {
  static NonPod foo();
}

Since getLanguageLinkage checks the language linkage, the linkage computation
cannot use the language linkage. Break the loop by checking just the context
in the linkage computation.

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

11 years agoWhen marking derived classes' virtual methods ODR-used in order to trigger
Nick Lewycky [Thu, 14 Feb 2013 00:55:17 +0000 (00:55 +0000)]
When marking derived classes' virtual methods ODR-used in order to trigger
instantiation in order to permit devirtualization later in codegen, skip over
pure functions since those can't be devirtualization targets.

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

11 years agoTeach ccc-analyze to pass on -iquote with no spaces between it an the argument.
Ted Kremenek [Thu, 14 Feb 2013 00:32:25 +0000 (00:32 +0000)]
Teach ccc-analyze to pass on -iquote with no spaces between it an the argument.

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

11 years agoActually fix rendering of the example code block!
Richard Smith [Thu, 14 Feb 2013 00:23:04 +0000 (00:23 +0000)]
Actually fix rendering of the example code block!

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

11 years agoSome grammar fixes to 'Format String Checking', and reorder the text slightly to...
Richard Smith [Thu, 14 Feb 2013 00:22:00 +0000 (00:22 +0000)]
Some grammar fixes to 'Format String Checking', and reorder the text slightly to try to make the final code block actually get rendered.

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

11 years agoDocument Clang's support for [[gnu::...]] attributes.
Richard Smith [Thu, 14 Feb 2013 00:13:34 +0000 (00:13 +0000)]
Document Clang's support for [[gnu::...]] attributes.

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

11 years ago[docs] The stat cache has been removed from the PCH, update the docs to remove mentio...
Argyrios Kyrtzidis [Thu, 14 Feb 2013 00:12:44 +0000 (00:12 +0000)]
[docs] The stat cache has been removed from the PCH, update the docs to remove mentions of it.

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

11 years agoobjective-C: Make order of ivars which are synthesized
Fariborz Jahanian [Wed, 13 Feb 2013 22:50:36 +0000 (22:50 +0000)]
objective-C: Make order of ivars which are synthesized
in the course of property synthesis deterministic (ordered
by their type size), instead of having hashtable order
(as it is currently). // rdar://13192366

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

11 years agoRemove outdated performance.html webpage.
Tanya Lattner [Wed, 13 Feb 2013 21:51:18 +0000 (21:51 +0000)]
Remove outdated performance.html webpage.

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

11 years ago[ms-inline asm] Add test case for r175083.
Chad Rosier [Wed, 13 Feb 2013 21:34:54 +0000 (21:34 +0000)]
[ms-inline asm] Add test case for r175083.

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

11 years agoubsan: Add checking for invalid downcasts. Per [expr.static.cast]p2 and p11,
Richard Smith [Wed, 13 Feb 2013 21:18:23 +0000 (21:18 +0000)]
ubsan: Add checking for invalid downcasts. Per [expr.static.cast]p2 and p11,
base-to-derived casts have undefined behavior if the object is not actually an
instance of the derived type.

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

11 years agoAllow breaking after the return type in function declarations.
Daniel Jasper [Wed, 13 Feb 2013 20:33:44 +0000 (20:33 +0000)]
Allow breaking after the return type in function declarations.

This has so far been disabled for Google style, but should be done
before breaking at nested name specifiers or in template parameters.

Before (in Google style):
template <typename T>
aaaaaaaa::aaaaa::aaaaaa<T, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<
    T>::aaaaaaa() {}

After:
template <typename T>
aaaaaaaa::aaaaa::aaaaaa<T, aaaaaaaaaaaaaaaaaaaaaaaaa>
aaaaaaaaaaaaaaaaaaaaaaaa<T>::aaaaaaa() {}

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

11 years agoUse 'RC_XBS' instead of 'RC_BUILDIT' to catch all times when it's built in the Apple...
Bill Wendling [Wed, 13 Feb 2013 19:44:17 +0000 (19:44 +0000)]
Use 'RC_XBS' instead of 'RC_BUILDIT' to catch all times when it's built in the Apple way.

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

11 years agoFix comment alignment close to the column limit.
Daniel Jasper [Wed, 13 Feb 2013 19:25:54 +0000 (19:25 +0000)]
Fix comment alignment close to the column limit.

Due to an error in one of the expressions, we used to not align comments
although it would have been possible.

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

11 years ago[libclang] Fix annotation of a range where the begin or end location
Argyrios Kyrtzidis [Wed, 13 Feb 2013 18:33:28 +0000 (18:33 +0000)]
[libclang] Fix annotation of a range where the begin or end location
is inside a macro argument.

Previously we would give up and not annotate anything in the range.
rdar://11891550

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

11 years ago... and now fix the +Asserts build
Timur Iskhodzhanov [Wed, 13 Feb 2013 12:24:19 +0000 (12:24 +0000)]
... and now fix the +Asserts build

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

11 years agoFix the microsoft-abi-structors test expectations to match both Release and Release...
Timur Iskhodzhanov [Wed, 13 Feb 2013 12:14:25 +0000 (12:14 +0000)]
Fix the microsoft-abi-structors test expectations to match both Release and Release+Asserts builds

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

11 years agoPull search state out as class members.
Manuel Klimek [Wed, 13 Feb 2013 10:54:19 +0000 (10:54 +0000)]
Pull search state out as class members.

Fix some comments.

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

11 years agoAn attempt to make the search algorithm easier to understand.
Manuel Klimek [Wed, 13 Feb 2013 10:46:36 +0000 (10:46 +0000)]
An attempt to make the search algorithm easier to understand.

- clear ownership: the SpecificBumpPtrAllocator owns all StateNodes
- this allows us to simplify the memoization data structure into a
  std::set (FIXME: figure out whether we want to use a hash based
  data structure).
- introduces StateNode as recursive data structure, instead of using
  Edge and the Seen-map combined to drill through the graph
- using a count to stabilize the penalty instead of relying on the
  container
- pulled out a method to forward-apply states in the end

This leads to a ~40% runtime decrease on Nico's benchmark.

Main FiXME is that the parameter lists of some function get too long.
I'd vote for either pulling the Queue etc into the Formatter proper,
or creating an inner class just for the search algorithm.

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

11 years agoEmit virtual/deleting destructors properly with -cxx-abi microsoft, PR15058
Timur Iskhodzhanov [Wed, 13 Feb 2013 08:37:51 +0000 (08:37 +0000)]
Emit virtual/deleting destructors properly with -cxx-abi microsoft, PR15058

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

11 years agoFormatter: And more cast tests (these don't pass yet).
Nico Weber [Wed, 13 Feb 2013 04:40:03 +0000 (04:40 +0000)]
Formatter: And more cast tests (these don't pass yet).

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

11 years agoFormatter: Add more cast tests.
Nico Weber [Wed, 13 Feb 2013 04:32:57 +0000 (04:32 +0000)]
Formatter: Add more cast tests.

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

11 years agoFormatter: Refactor the cast detection code to be a bit more readable.
Nico Weber [Wed, 13 Feb 2013 04:13:13 +0000 (04:13 +0000)]
Formatter: Refactor the cast detection code to be a bit more readable.

No functionality change. Also add another cast test.

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

11 years agoFormatter: Detect ObjC method expressions after casts.
Nico Weber [Wed, 13 Feb 2013 03:48:27 +0000 (03:48 +0000)]
Formatter: Detect ObjC method expressions after casts.

Not all casts are correctly detected yet, but it helps in some cases.

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

11 years agoChange this comment to helpfully explain why it's there.
Nick Lewycky [Wed, 13 Feb 2013 03:34:21 +0000 (03:34 +0000)]
Change this comment to helpfully explain why it's there.

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

11 years ago[analyzer] Use Clang's evaluation for global constants and default arguments.
Jordan Rose [Wed, 13 Feb 2013 03:11:06 +0000 (03:11 +0000)]
[analyzer] Use Clang's evaluation for global constants and default arguments.

Previously, we were handling only simple integer constants for globals and
the smattering of implicitly-valued expressions handled by Environment for
default arguments. Now, we can use any integer constant expression that
Clang can evaluate, in addition to everything we handled before.

PR15094 / <rdar://problem/12830437>

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

11 years ago[analyzer] Use makeZeroVal in RegionStore's lazy evaluation of statics.
Jordan Rose [Wed, 13 Feb 2013 03:11:01 +0000 (03:11 +0000)]
[analyzer] Use makeZeroVal in RegionStore's lazy evaluation of statics.

No functionality change.

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

11 years ago[ms-inline-asm] Test cases to ensure the AsmRewrite list is sorted (r175021).
Chad Rosier [Wed, 13 Feb 2013 01:06:08 +0000 (01:06 +0000)]
[ms-inline-asm] Test cases to ensure the AsmRewrite list is sorted (r175021).
Part of rdar://13202662

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

11 years agoOrder the methods in the global method pool based on when they become visible, not...
Douglas Gregor [Tue, 12 Feb 2013 23:36:21 +0000 (23:36 +0000)]
Order the methods in the global method pool based on when they become visible, not when they become deserialized <rdar://problem/13203033>.

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

11 years agoReplace 'signed' with 'int'. 'signed' is not typical for LLVM style
Dmitri Gribenko [Tue, 12 Feb 2013 22:40:22 +0000 (22:40 +0000)]
Replace 'signed' with 'int'.  'signed' is not typical for LLVM style

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

11 years ago[preprocessing record] Add some sanity checks for the preprocessed entity index
Argyrios Kyrtzidis [Tue, 12 Feb 2013 21:41:23 +0000 (21:41 +0000)]
[preprocessing record] Add some sanity checks for the preprocessed entity index
to make sure we don't crash on release if the index is not valid.

rdar://13089714

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

11 years ago[ms-inline-asm] Add test cases for the align/emit directives.
Chad Rosier [Tue, 12 Feb 2013 21:34:14 +0000 (21:34 +0000)]
[ms-inline-asm] Add test cases for the align/emit directives.
Part of rdar://13200215

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

11 years agoAdd a test for r174980, that we used to accept
Dmitri Gribenko [Tue, 12 Feb 2013 20:43:41 +0000 (20:43 +0000)]
Add a test for r174980, that we used to accept

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

11 years agoFix crash for incomplete labels in macros.
Daniel Jasper [Tue, 12 Feb 2013 20:17:17 +0000 (20:17 +0000)]
Fix crash for incomplete labels in macros.

Still the formatting can be improved, but at least we don't assert any
more. This happened when trying to format lib/Sema/SemaType.cpp.

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

11 years ago[ms-inline asm] Update test case now that we are correctly parsing __emit directives.
Chad Rosier [Tue, 12 Feb 2013 19:42:57 +0000 (19:42 +0000)]
[ms-inline asm] Update test case now that we are correctly parsing __emit directives.

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

11 years agoFixing the MSVC compiler warning a different way; removed use of static_cast and...
Aaron Ballman [Tue, 12 Feb 2013 19:20:48 +0000 (19:20 +0000)]
Fixing the MSVC compiler warning a different way; removed use of static_cast and instead used a signed integer parameter.

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

11 years agoTypo.
Chad Rosier [Tue, 12 Feb 2013 19:15:05 +0000 (19:15 +0000)]
Typo.

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

11 years ago[ms-inline asm] Add a few test cases for the parsing of hexidecimal integers.
Chad Rosier [Tue, 12 Feb 2013 18:45:21 +0000 (18:45 +0000)]
[ms-inline asm] Add a few test cases for the parsing of hexidecimal integers.

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

11 years agoRemoving a signed/unsigned mismatch warning triggered in MSVC 11.
Aaron Ballman [Tue, 12 Feb 2013 18:39:15 +0000 (18:39 +0000)]
Removing a signed/unsigned mismatch warning triggered in MSVC 11.

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

11 years agoAccept over-qualified constructor in MSVC emulation mode
Dmitri Gribenko [Tue, 12 Feb 2013 17:27:41 +0000 (17:27 +0000)]
Accept over-qualified constructor in MSVC emulation mode

MSVC accepts this:

class A {
  A::A();
};

Clang accepts regular member functions with extra qualification as an MS
extension, but not constructors.  This changes the parser to defer rejecting
qualified constructors so that the same Sema logic can apply to constructors as
regular member functions.  This also improves the error message when MS
extensions are disabled (in my opinion). Before it was:

/Users/jason/Desktop/test.cpp:2:8: error: expected member name or ';' after declaration specifiers
  A::A();
  ~~~~ ^
1 error generated.

After:

/Users/jason/Desktop/test.cpp:2:6: error: extra qualification on member 'A'
  A::A();
  ~~~^
1 error generated.

Patch by Jason Haslam.

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

11 years agoFix bug in the adjustment to existing lines.
Daniel Jasper [Tue, 12 Feb 2013 16:51:23 +0000 (16:51 +0000)]
Fix bug in the adjustment to existing lines.

Before (if only the second line was reformatted):
void f() {}
          void g() {}

After:
void f() {}
void g() {}

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

11 years agoFormatter: Correctly format stars in `sizeof(int**)` and similar places.
Nico Weber [Tue, 12 Feb 2013 16:17:07 +0000 (16:17 +0000)]
Formatter: Correctly format stars in `sizeof(int**)` and similar places.

This redoes how '*' and '&' are classified as pointer / reference markers when
followed by ')', '>', or ','.

Previously, determineStarAmpUsage() marked a single '*' and '&' followed by
')', '>', or ',' as pointer or reference marker. Now, all '*'s and '&'s
preceding ')', '>', or ',' are marked as pointer / reference markers. Fixes
PR14884.

Since only the last '*' in 'int ***' was marked as pointer before (the rest
were unary operators, which don't reach spaceRequiredBetween()),
spaceRequiredBetween() now had to be thought about handing multiple '*'s in
sequence.

Before:
  return sizeof(int * *);
  Type **A = static_cast<Type * *>(P);

Now:
  return sizeof(int**);
  Type **A = static_cast<Type **>(P);

While here, also make all methods of AnnotatingParser except parseLine()
private.

Review URL: http://llvm-reviews.chandlerc.com/D384

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

11 years agoAdding more overloads for allOf matcher
Edwin Vane [Tue, 12 Feb 2013 13:55:40 +0000 (13:55 +0000)]
Adding more overloads for allOf matcher

Adding overloads of allOf accepting 4 and 5 arguments.

Reviewer: klimek

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

11 years agoRename -constructors test to just -structors as in fact it tests dtors too. Also...
Timur Iskhodzhanov [Tue, 12 Feb 2013 13:22:47 +0000 (13:22 +0000)]
Rename -constructors test to just -structors as in fact it tests dtors too. Also, fix a minor typo in the test.

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

11 years agoAttempt to fix this test on i686 targets.
Nick Lewycky [Tue, 12 Feb 2013 08:59:01 +0000 (08:59 +0000)]
Attempt to fix this test on i686 targets.

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

11 years agoThe meat of this patch is in BuildCXXMemberCalLExpr where we make it use
Nick Lewycky [Tue, 12 Feb 2013 08:08:54 +0000 (08:08 +0000)]
The meat of this patch is in BuildCXXMemberCalLExpr where we make it use
MarkMemberReferenced instead of marking functions referenced directly. An audit
of callers to MarkFunctionReferenced and DiagnoseUseOfDecl also caused a few
other changes:
 * don't mark functions odr-used when considering them for an initialization
   sequence. Do mark them referenced though.
 * the function nominated by the cleanup attribute should be diagnosed.
 * operator new/delete should be diagnosed when building a 'new' expression.

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

11 years agoProperly assemble PHIs after a null-checked invoke of objc_msgSend.
John McCall [Tue, 12 Feb 2013 05:53:35 +0000 (05:53 +0000)]
Properly assemble PHIs after a null-checked invoke of objc_msgSend.
rdar://12046763

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

11 years agoFix a bug reduced from a crash when trying to use modules with libc++. We check
Richard Smith [Tue, 12 Feb 2013 05:48:23 +0000 (05:48 +0000)]
Fix a bug reduced from a crash when trying to use modules with libc++. We check
the linkage of functions and variables while merging declarations from modules,
and we don't necessarily have enough of the rest of the AST loaded at that
point to allow us to compute linkage, so serialize it instead.

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

11 years ago+ specified progress information
Anton Yartsev [Tue, 12 Feb 2013 05:02:54 +0000 (05:02 +0000)]
+ specified progress information

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

11 years ago+ centered progress cells
Anton Yartsev [Tue, 12 Feb 2013 04:45:48 +0000 (04:45 +0000)]
+ centered progress cells
+ added progress information for several checkers

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

11 years agoCall __cxa_begin_catch with the current exception before
John McCall [Tue, 12 Feb 2013 03:51:46 +0000 (03:51 +0000)]
Call __cxa_begin_catch with the current exception before
calling std::terminate().  rdar://11904428

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

11 years agoChange some CGF parameters to CGMs.
John McCall [Tue, 12 Feb 2013 03:51:38 +0000 (03:51 +0000)]
Change some CGF parameters to CGMs.

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

11 years agoRemove an assert which triggers when a decl context in a module hits the 'has
Richard Smith [Tue, 12 Feb 2013 02:32:35 +0000 (02:32 +0000)]
Remove an assert which triggers when a decl context in a module hits the 'has
lexical storage but not visible storage' case in C++. It's unclear whether we
even need the special-case handling for C++, since it seems to be working
around our not serializing a lookup table for the TU in C. But in any case,
the assertion is incorrect.

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

11 years agoPerform placeholder conversions on the controller of a _Generic
John McCall [Tue, 12 Feb 2013 02:08:12 +0000 (02:08 +0000)]
Perform placeholder conversions on the controller of a _Generic
expression.

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

11 years agoDiagnose loads of 'half' l-values in OpenCL.
John McCall [Tue, 12 Feb 2013 01:29:43 +0000 (01:29 +0000)]
Diagnose loads of 'half' l-values in OpenCL.
Patch by Joey Gouly!

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

11 years agoBacking out r174919 while I investigate a self-host bug on Takumi's builder.
Lang Hames [Tue, 12 Feb 2013 00:44:43 +0000 (00:44 +0000)]
Backing out r174919 while I investigate a self-host bug on Takumi's builder.

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

11 years agoIn ARC, emit non-peepholed +1s within the full-expression instead
John McCall [Tue, 12 Feb 2013 00:25:08 +0000 (00:25 +0000)]
In ARC, emit non-peepholed +1s within the full-expression instead
of immediately afterwards.

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

11 years agoSplit a couple of tests out into their own file.
John McCall [Tue, 12 Feb 2013 00:25:02 +0000 (00:25 +0000)]
Split a couple of tests out into their own file.

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

11 years agoWhen generating IR for default copy-constructors, copy-assignment operators,
Lang Hames [Mon, 11 Feb 2013 23:44:11 +0000 (23:44 +0000)]
When generating IR for default copy-constructors, copy-assignment operators,
move-constructors and move-assignment operators, use memcpy to copy adjacent
POD members.

Previously, classes with one or more Non-POD members would fall back on
element-wise copies for all members, including POD members. This often
generated a lot of IR. Without padding metadata, it wasn't often possible
for the LLVM optimizers to turn the element-wise copies into a memcpy.

This code hasn't yet received any serious tuning. I didn't see any serious
regressions on a self-hosted clang build, or any of the nightly tests, but
I think it's important to get this out in the wild to get more testing.
Insights, feedback and comments welcome.

Many thanks to David Blaikie, Richard Smith, and especially John McCall for
their help and feedback on this work.

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

11 years agoTiming data was removed years ago. Remove these links.
Tanya Lattner [Mon, 11 Feb 2013 23:32:10 +0000 (23:32 +0000)]
Timing data was removed years ago. Remove these links.

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

11 years agoDon't bother reconciling external visible decls against our current set of
Richard Smith [Mon, 11 Feb 2013 22:02:16 +0000 (22:02 +0000)]
Don't bother reconciling external visible decls against our current set of
declarations if we didn't have a lookup map when the external decls were added.

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

11 years agoobjective-C modern translator: Fixes a mistranslation
Fariborz Jahanian [Mon, 11 Feb 2013 19:30:33 +0000 (19:30 +0000)]
objective-C modern translator: Fixes a mistranslation
of @throw statement by finding location of the ';'
correctly. // rdar://13186010

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