]> granicus.if.org Git - clang/log
clang
11 years agoDocumentation: add an idea for an automatic refactoring
Dmitri Gribenko [Sun, 24 Feb 2013 19:04:36 +0000 (19:04 +0000)]
Documentation: add an idea for an automatic refactoring

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

11 years agoAllow breaking between a type and name in variable declarations.
Daniel Jasper [Sun, 24 Feb 2013 18:54:32 +0000 (18:54 +0000)]
Allow breaking between a type and name in variable declarations.

This fixes llvm.org/PR14967 and is generall necessary to avoid
situations where the column limit is exceeded. The challenge is
restricting such lines splits, otherwise clang-format suddenly starts
breaking at bad places.

Before:
ReallyLongReturnType<TemplateParam1, TemplateParam2>
ReallyReallyLongFunctionName(
    const std::string &SomeParameter,
    const SomeType<string,
                   SomeOtherTemplateParameter> &ReallyReallyLongParameterName,
    const SomeType<string,
                   SomeOtherTemplateParameter> &AnotherLongParameterName) {}

After:
ReallyLongReturnType<TemplateParam1, TemplateParam2>
ReallyReallyLongFunctionName(
    const std::string &SomeParameter,
    const SomeType<string, SomeOtherTemplateParameter> &
        ReallyReallyLongParameterName,
    const SomeType<string, SomeOtherTemplateParameter> &
        AnotherLongParameterName) {}

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

11 years agoAdd the testcase from PR13573, this used to crash.
Benjamin Kramer [Sun, 24 Feb 2013 15:51:32 +0000 (15:51 +0000)]
Add the testcase from PR13573, this used to crash.

The error is a bit strange tbh, but better than crashing.

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

11 years ago[analyzer] tracking stores/constraints now works for ObjC ivars or struct fields.
Ted Kremenek [Sun, 24 Feb 2013 07:21:01 +0000 (07:21 +0000)]
[analyzer] tracking stores/constraints now works for ObjC ivars or struct fields.

This required more changes than I originally expected:

- ObjCIvarRegion implements "canPrintPretty" et al
- DereferenceChecker indicates the null pointer source is an ivar
- bugreporter::trackNullOrUndefValue() uses an alternate algorithm
  to compute the location region to track by scouring the ExplodedGraph.
  This allows us to get the actual MemRegion for variables, ivars,
  fields, etc.  We only hand construct a VarRegion for C++ references.
- ExplodedGraph no longer drops nodes for expressions that are marked
  'lvalue'.  This is to facilitate the logic in the previous bullet.
  This may lead to a slight increase in size in the ExplodedGraph,
  which I have not measured, but it is likely not to be a big deal.

I have validated each of the changed plist output.

Fixes <rdar://problem/12114812>

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

11 years agoAdd "KnownSVal" to represent SVals that cannot be UnknownSVal.
Ted Kremenek [Sun, 24 Feb 2013 07:20:53 +0000 (07:20 +0000)]
Add "KnownSVal" to represent SVals that cannot be UnknownSVal.

This provides a few sundry cleanups, and allows us to provide
a compile-time check for a case that was a runtime assertion.

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

11 years agoAdd regression test for serialized diagnostics for notes without locations.
Ted Kremenek [Sun, 24 Feb 2013 07:20:47 +0000 (07:20 +0000)]
Add regression test for serialized diagnostics for notes without locations.

This meant to be included in r175802.

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

11 years agoPR15338: Don't assert if -fsanitize=bounds sees array indexing on an incomplete
Richard Smith [Sun, 24 Feb 2013 01:56:24 +0000 (01:56 +0000)]
PR15338: Don't assert if -fsanitize=bounds sees array indexing on an incomplete
array type.

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

11 years ago[preprocessor] Use MacroDirective in the preprocessor callbacks to make available the
Argyrios Kyrtzidis [Sun, 24 Feb 2013 00:05:14 +0000 (00:05 +0000)]
[preprocessor] Use MacroDirective in the preprocessor callbacks to make available the
full information about the macro (e.g if it was imported and where).

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

11 years agoAdd comments for the MacroDirective & MacroInfo classes.
Argyrios Kyrtzidis [Sun, 24 Feb 2013 00:05:05 +0000 (00:05 +0000)]
Add comments for the MacroDirective & MacroInfo classes.

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

11 years agoIn Sema::InstantiateStaticDataMemberDefinition, pass the var decl to the consumer
Argyrios Kyrtzidis [Sun, 24 Feb 2013 00:05:01 +0000 (00:05 +0000)]
In Sema::InstantiateStaticDataMemberDefinition, pass the var decl to the consumer
just using ASTConsumer::HandleCXXStaticMemberVarInstantiation(), don't pass it with
ASTConsumer::HandleTopLevelDecl.

ASTConsumer::HandleTopLevelDecl is intended for user-written top-level decls;
a consumer can treat an instantiated static data member however it wants of course.

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

11 years agoBetter formatting of conditional expressions.
Daniel Jasper [Sat, 23 Feb 2013 21:01:55 +0000 (21:01 +0000)]
Better formatting of conditional expressions.

In conditional expressions, if the condition is split over multiple
lines, also break before both operands.

This prevents formattings like:

  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ==
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ? b : c;

Which are bad, because they suggestion incorrect operator precedence:

  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ==
      (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ? b : c);

This lead to the discovery that the expression parser incorrectly
handled conditional operators and that it could also handle semicolons
(which in turn reduced the amount of special casing for for-loops). As a
side-effect, we can now apply the bin-packing configuration to the
sections of for-loops.

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

11 years agoReference the canonical commit (r175462) in the value casting release note.
David Blaikie [Sat, 23 Feb 2013 19:30:31 +0000 (19:30 +0000)]
Reference the canonical commit (r175462) in the value casting release note.

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

11 years agoDocument the value casting API changes.
David Blaikie [Sat, 23 Feb 2013 19:27:10 +0000 (19:27 +0000)]
Document the value casting API changes.

After changing the way several value inheritance hierarchies (TypeLoc,
CFGelement, ProgramPoint and SVal) handle casting, this documentation describes
how 3rd party code may need to be updated to compile with the new APIs.

As suggested by Sean Silva on cfe-dev.

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

11 years agoPrefer 'and' over '&' in comments.
David Blaikie [Sat, 23 Feb 2013 19:20:56 +0000 (19:20 +0000)]
Prefer 'and' over '&' in comments.

Post commit code review feedback from Matt Beaumont-Gay on r174248.

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

11 years agoShrink SmallPtrSet. It gets swapped a lot which copies the whole small part.
Benjamin Kramer [Sat, 23 Feb 2013 16:56:22 +0000 (16:56 +0000)]
Shrink SmallPtrSet. It gets swapped a lot which copies the whole small part.

Testing shows that it's empty in >99% of the cases and I couldn't find a case
where it contained more than 2 elements.

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

11 years agoAdd streamed versions of getQualifiedNameAsString.
Benjamin Kramer [Sat, 23 Feb 2013 13:53:57 +0000 (13:53 +0000)]
Add streamed versions of getQualifiedNameAsString.

Move the cold virtual method getNameForDiagnostic out of line.

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

11 years agoRemove data member MSAsmStmt::AsmLoc, wrongly hiding AsmStmt::AsmLoc.
Enea Zaffanella [Sat, 23 Feb 2013 12:27:19 +0000 (12:27 +0000)]
Remove data member MSAsmStmt::AsmLoc, wrongly hiding AsmStmt::AsmLoc.

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

11 years agoDon't recognize unnamed pointer parameters as casts.
Daniel Jasper [Sat, 23 Feb 2013 08:07:18 +0000 (08:07 +0000)]
Don't recognize unnamed pointer parameters as casts.

This fixes llvm.org/PR15061.

Before: virtual void f(int *)const;
After:  virtual void f(int *) const;

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

11 years agoAllow splitting between string literals and identifiers.
Daniel Jasper [Sat, 23 Feb 2013 07:46:38 +0000 (07:46 +0000)]
Allow splitting between string literals and identifiers.

Also don't break in long include directives as that is not desired.

We can now format:

  #include "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
  #define LL_FORMAT "ll"
  printf("aaaaa: %d, bbbbbbbbb: %" LL_FORMAT "d, cccccccc: %" LL_FORMAT
         "d, ddddddddd: %" LL_FORMAT "d\n");

Before, this led to weird results.

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

11 years agoImplement __builtin_eh_return_data_regno() for ARM and MIPS.
Logan Chien [Sat, 23 Feb 2013 04:24:36 +0000 (04:24 +0000)]
Implement __builtin_eh_return_data_regno() for ARM and MIPS.

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

11 years agoclang/AST/Decl.h: Add "raw_ostream.h" to appease msvc.
NAKAMURA Takumi [Sat, 23 Feb 2013 03:59:16 +0000 (03:59 +0000)]
clang/AST/Decl.h: Add "raw_ostream.h" to appease msvc.

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

11 years agoubsan: Emit bounds checks for array indexing, vector indexing, and (in really simple...
Richard Smith [Sat, 23 Feb 2013 02:53:19 +0000 (02:53 +0000)]
ubsan: Emit bounds checks for array indexing, vector indexing, and (in really simple cases) pointer arithmetic. This augments the existing bounds checking with language-level array bounds information.

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

11 years agoTest that attribute(availability) doesn't override private_extern.
John McCall [Sat, 23 Feb 2013 01:15:17 +0000 (01:15 +0000)]
Test that attribute(availability) doesn't override private_extern.

rdar://12399248

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

11 years agoRemove the CFGElement "Invalid" state.
David Blaikie [Sat, 23 Feb 2013 00:29:34 +0000 (00:29 +0000)]
Remove the CFGElement "Invalid" state.

Use Optional<CFG*> where invalid states were needed previously. In the one case
where that's not possible (beginAutomaticObjDtorsInsert) just use a dummy
CFGAutomaticObjDtor.

Thanks for the help from Jordan Rose & discussion/feedback from Ted Kremenek
and Doug Gregor.

Post commit code review feedback on r175796 by Ted Kremenek.

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

11 years agoRemove the hack that avoided mangling static functions in extern C contexts.
Rafael Espindola [Sat, 23 Feb 2013 00:26:28 +0000 (00:26 +0000)]
Remove the hack that avoided mangling static functions in extern C contexts.

Weather we should give C language linkage to functions and variables with
internal linkage probably depends on how much code assumes it. The standard
says they should have no language linkage, but gcc and msvc assign them
C language linkage.

This commit removes the hack that was preventing the mangling on static
functions declare in extern C contexts. It is an experiment to see if we
can implement the rules in the standard.

If it turns out that many users depend on these functions and variables
having C language linkage, we should change isExternC instead and try
to convince the CWG to change the standard.

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

11 years agoRevert r175912, "Add support for coldcc to clang" at John's request.
Peter Collingbourne [Sat, 23 Feb 2013 00:06:18 +0000 (00:06 +0000)]
Revert r175912, "Add support for coldcc to clang" at John's request.

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

11 years agoPropagate the split dwarf file information through into the backend
Eric Christopher [Fri, 22 Feb 2013 23:50:16 +0000 (23:50 +0000)]
Propagate the split dwarf file information through into the backend
and through to the debug info in the module. In order to make the
testcase a bit more efficient allow the filename to go through
compilation for compile and not assemble jobs and turn off the
extract for cases where we don't create an object.

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

11 years ago[libclang] Fix assertion hit when code-completing inside a function macro with more
Argyrios Kyrtzidis [Fri, 22 Feb 2013 22:28:58 +0000 (22:28 +0000)]
[libclang] Fix assertion hit when code-completing inside a function macro with more
arguments than it should accept.

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

11 years agoobjective-C arg: provide fixit support when
Fariborz Jahanian [Fri, 22 Feb 2013 22:02:53 +0000 (22:02 +0000)]
objective-C arg: provide fixit support when
c++'s named cast need be replaced for bridge casting.
// rdar://12788838

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

11 years agoUpdate tests so that we don't test for function-only attributes on call sites.
Bill Wendling [Fri, 22 Feb 2013 21:12:51 +0000 (21:12 +0000)]
Update tests so that we don't test for function-only attributes on call sites.

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

11 years agoDriver: Pass down the -march setting down to -cc1as on x86 too.
Benjamin Kramer [Fri, 22 Feb 2013 20:55:17 +0000 (20:55 +0000)]
Driver: Pass down the -march setting down to -cc1as on x86 too.

The assembler historically didn't make use of any target features, but this has
changed when support for old CPUs that don't support long nops was added.

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

11 years agoMake sure we apply attributes to correct places.
Bill Wendling [Fri, 22 Feb 2013 20:53:29 +0000 (20:53 +0000)]
Make sure we apply attributes to correct places.

Some attributes make sense only on the function or on the call site, but not
both. Make this distinction here.

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

11 years agoSplit out the command handling for split debug info, we're going
Eric Christopher [Fri, 22 Feb 2013 20:12:52 +0000 (20:12 +0000)]
Split out the command handling for split debug info, we're going
to want to propagate some information through the module into
the back end and so need to pass it through to codegen.

Also make the methods file static so we can use them in other places.

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

11 years ago[analyzer] Don't canonicalize the RecordDecl used in CXXBaseObjectRegion.
Jordan Rose [Fri, 22 Feb 2013 19:33:13 +0000 (19:33 +0000)]
[analyzer] Don't canonicalize the RecordDecl used in CXXBaseObjectRegion.

This Decl shouldn't be the canonical Decl; it should be the Decl used by
the CXXBaseSpecifier in the subclass. Unfortunately, that means continuing
to throw getCanonicalDecl() on all comparisons.

This fixes MemRegion::getAsOffset's use of ASTRecordLayout when redeclarations
are involved.

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

11 years agoAdd support for coldcc to clang
Peter Collingbourne [Fri, 22 Feb 2013 19:24:35 +0000 (19:24 +0000)]
Add support for coldcc to clang

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

11 years ago[preprocessing record] Have the MacroDefinitions map point to the MacroDefinition...
Argyrios Kyrtzidis [Fri, 22 Feb 2013 18:35:59 +0000 (18:35 +0000)]
[preprocessing record] Have the MacroDefinitions map point to the MacroDefinition object instead
its index in the preprocessed entities vector.

This is because the order of the entities in the vector can change in some (uncommon) cases.

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

11 years agoReplace some typically large vectors with SmallVector.
Benjamin Kramer [Fri, 22 Feb 2013 18:29:39 +0000 (18:29 +0000)]
Replace some typically large vectors with SmallVector.

This may seem counter-intuitive but the POD-like optimization helps when the
vectors grow into multimegabyte buffers. SmallVector calls realloc which knows
how to twiddle virtual memory bits and avoids large copies.

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

11 years agoMake sure pragmas don't attach visibility attributes to auto variables with
Rafael Espindola [Fri, 22 Feb 2013 17:59:16 +0000 (17:59 +0000)]
Make sure pragmas don't attach visibility attributes to auto variables with
internal linkage.

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

11 years agoSuppress -Wswitch to unbreak the build.
David Blaikie [Fri, 22 Feb 2013 17:44:58 +0000 (17:44 +0000)]
Suppress -Wswitch to unbreak the build.

This may need to be fixed more intelligently - I don't have enough context to
be sure what the appropriate fix is right now.

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

11 years ago[Sema] Semantic analysis for empty-declaration and attribute-declaration.
Michael Han [Fri, 22 Feb 2013 17:15:32 +0000 (17:15 +0000)]
[Sema] Semantic analysis for empty-declaration and attribute-declaration.

Introduce a new AST Decl node "EmptyDecl" to model empty-declaration. Have attributes from attribute-declaration appertain
to the EmptyDecl node by creating the AST representations of these attributes and attach them to the EmptyDecl node so these
attributes can be sema checked just as attributes attached to "normal" declarations.

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

11 years agoUse raw_ostream::indent, update comment.
Benjamin Kramer [Fri, 22 Feb 2013 16:13:34 +0000 (16:13 +0000)]
Use raw_ostream::indent, update comment.

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

11 years agoPush the raw_ostream through the template diffing code.
Benjamin Kramer [Fri, 22 Feb 2013 16:08:12 +0000 (16:08 +0000)]
Push the raw_ostream through the template diffing code.

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

11 years agoStreamify FormatASTNodeDiagnosticArgument.
Benjamin Kramer [Fri, 22 Feb 2013 15:46:08 +0000 (15:46 +0000)]
Streamify FormatASTNodeDiagnosticArgument.

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

11 years agoStreamify getNameForDiagnostic and remove the string versions of PrintTemplateArgumen...
Benjamin Kramer [Fri, 22 Feb 2013 15:46:01 +0000 (15:46 +0000)]
Streamify getNameForDiagnostic and remove the string versions of PrintTemplateArgumentList.

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

11 years agoComment parsing: add CommentOptions to allow specifying custom comment block commands
Dmitri Gribenko [Fri, 22 Feb 2013 14:21:27 +0000 (14:21 +0000)]
Comment parsing: add CommentOptions to allow specifying custom comment block commands

Add an ability to specify custom documentation block comment commands via a new
class CommentOptions.  The intention is that this class will hold future
customizations for comment parsing, including defining documentation comments
with specific numbers of parameters, etc.

CommentOptions instance is a member of LangOptions.

CommentOptions is controlled by a new command-line parameter
-fcomment-block-commands=Foo,Bar,Baz.

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

11 years agoStmtPrinter: Directly print types to the stream instead of taking a detour through...
Benjamin Kramer [Fri, 22 Feb 2013 14:19:01 +0000 (14:19 +0000)]
StmtPrinter: Directly print types to the stream instead of taking a detour through getAsString.

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

11 years agoFix MergeFunctionDecl implicit CC for static methods.
Timur Iskhodzhanov [Fri, 22 Feb 2013 12:42:50 +0000 (12:42 +0000)]
Fix MergeFunctionDecl implicit CC for static methods.

Patch by Alexander Zinenko!

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

11 years agoscan-build: Remove debug print.
Benjamin Kramer [Fri, 22 Feb 2013 12:07:39 +0000 (12:07 +0000)]
scan-build: Remove debug print.

PR15329.

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

11 years agoC++11 status page:
Richard Smith [Fri, 22 Feb 2013 09:31:00 +0000 (09:31 +0000)]
C++11 status page:
 * Mark attributes as done in SVN.
 * Downgrade alignment support from 'Clang 3.0' to 'SVN', now that we actually implement the rules.
 * Upgrade 'Dynamic initialization with concurrency' from 'No' to 'Clang 2.9' -- all that is required here is the ABI-mandated locking for the initialization of static locals.

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

11 years agoDon't crash if we try to apply 'alignas' to a variable declared with an
Richard Smith [Fri, 22 Feb 2013 09:21:42 +0000 (09:21 +0000)]
Don't crash if we try to apply 'alignas' to a variable declared with an
incomplete type.

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

11 years agoDon't accidentally and silently accept C++11 attributes in decl-specifier-seqs
Richard Smith [Fri, 22 Feb 2013 09:15:49 +0000 (09:15 +0000)]
Don't accidentally and silently accept C++11 attributes in decl-specifier-seqs
in C++98.

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

11 years agoUpdate to use references to attribute groups instead of listing the attributes on...
Bill Wendling [Fri, 22 Feb 2013 09:10:20 +0000 (09:10 +0000)]
Update to use references to attribute groups instead of listing the attributes on the call/invoke instructions.

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

11 years agoPer the grammar in [dcl.dcl]p1, a simple-declaration can only have attributes
Richard Smith [Fri, 22 Feb 2013 09:06:26 +0000 (09:06 +0000)]
Per the grammar in [dcl.dcl]p1, a simple-declaration can only have attributes
if it has declarators. We were missing the check for this in a couple of places.

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

11 years agoHandle alignas(foo...) pack expansions.
Richard Smith [Fri, 22 Feb 2013 08:32:16 +0000 (08:32 +0000)]
Handle alignas(foo...) pack expansions.

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

11 years agoIn LookupResult::resolveKind(), when handling multiple found declarations, ignore...
Argyrios Kyrtzidis [Fri, 22 Feb 2013 06:58:37 +0000 (06:58 +0000)]
In LookupResult::resolveKind(), when handling multiple found declarations, ignore invalid declarations.

This reduces the "ambiguous reference" errors (which are rather strange in C/ObjC) and fixes an assertion hit
with an invalid code test case.

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

11 years agoWhen a parameter list in a C function has an error, recover by forming a K&R function,
Argyrios Kyrtzidis [Fri, 22 Feb 2013 06:58:32 +0000 (06:58 +0000)]
When a parameter list in a C function has an error, recover by forming a K&R function,
instead of a non-function type.

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

11 years agoDon't crash when applying an alloc_size attribute on a K&R function.
Argyrios Kyrtzidis [Fri, 22 Feb 2013 06:58:28 +0000 (06:58 +0000)]
Don't crash when applying an alloc_size attribute on a K&R function.

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

11 years agoDon't skip '_Alignas' when disambiguating 'final'. '_Alignas' can't appear here,
Richard Smith [Fri, 22 Feb 2013 06:46:23 +0000 (06:46 +0000)]
Don't skip '_Alignas' when disambiguating 'final'. '_Alignas' can't appear here,
and we used to assert if it did.

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

11 years agoTeach -ast-print how to print trailing-return-types.
Richard Smith [Fri, 22 Feb 2013 05:54:51 +0000 (05:54 +0000)]
Teach -ast-print how to print trailing-return-types.

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

11 years ago[analyzer] Implement "Loop executed 0 times" diagnostic correctly.
Ted Kremenek [Fri, 22 Feb 2013 05:45:33 +0000 (05:45 +0000)]
[analyzer] Implement "Loop executed 0 times" diagnostic correctly.

Fixes <rdar://problem/13236549>

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

11 years agoImplement C++11 [dcl.align]p6-p8, and C11 6.7.5/7. This had to be split out of
Richard Smith [Fri, 22 Feb 2013 04:55:39 +0000 (04:55 +0000)]
Implement C++11 [dcl.align]p6-p8, and C11 6.7.5/7. This had to be split out of
the normal attribute-merging path, because we can't merge alignment attributes
without knowing the complete set of alignment attributes which apply to a
particular declaration.

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

11 years ago[libclang] Fix a crash with invalid code, while skip function bodies is enabled.
Argyrios Kyrtzidis [Fri, 22 Feb 2013 04:11:06 +0000 (04:11 +0000)]
[libclang] Fix a crash with invalid code, while skip function bodies is enabled.

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

11 years agoDecl.cpp/mergeTemplateLV(): Tweak a description. [-Wdocumentation]
NAKAMURA Takumi [Fri, 22 Feb 2013 04:06:28 +0000 (04:06 +0000)]
Decl.cpp/mergeTemplateLV(): Tweak a description. [-Wdocumentation]

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

11 years agoOnly suppress instance context if a member is actually
John McCall [Fri, 22 Feb 2013 03:52:55 +0000 (03:52 +0000)]
Only suppress instance context if a member is actually
accessible in its declaring class;  otherwise we might
fail to apply [class.protected] when considering
accessibility in derived classes.

Noticed by inspection; <rdar://13270329>.

I had an existing test wrong.  Here's why it's wrong:

Follow the rules (and notation) of [class.access]p5.
The naming class (N) is B and the context (R) is D::getX.
- 'x' as a member of B is protected, but R does not occur
  in a member or friend of a class derived from B.
- There does exist a base class of B, A, which is accessible
  from R, and 'x' is accessible at R when named in A because
  'x' as a member of A is protected and R occurs in a member
  of a class, D, that is derived from A;  however, by
  [class.protected], the class of the object expression must
  be equal to or derived from that class, and A does not
  derive from D.

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

11 years ago[analyzer] Place all inlining policy checks into one palce
Anna Zaks [Fri, 22 Feb 2013 02:59:24 +0000 (02:59 +0000)]
[analyzer] Place all inlining policy checks into one palce

Previously, we had the decisions about inlining spread out
over multiple functions.

In addition to the refactor, this commit ensures
that we will always inline BodyFarm functions as long as the Decl
is available. This fixes false positives due to those functions
not being inlined when no or minimal inlining is enabled such (as
shallow mode).

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

11 years agoAdd -fbracket-depth=N, analogous to -ftemplate-depth= and -fconstexpr-depth=,
Richard Smith [Fri, 22 Feb 2013 01:59:51 +0000 (01:59 +0000)]
Add -fbracket-depth=N, analogous to -ftemplate-depth= and -fconstexpr-depth=,
to control the check for the C 5.2.4.1 / C++ [implimits] restriction on nesting
levels for parentheses, brackets and braces.

Some code with heavy macro use exceeds the default limit of 256, but we don't
want to increase it generally to avoid stack overflow on stack-constrained
systems.

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

11 years ago[analyzer] Make sure a materialized temporary matches its bindings.
Jordan Rose [Fri, 22 Feb 2013 01:51:15 +0000 (01:51 +0000)]
[analyzer] Make sure a materialized temporary matches its bindings.

This is a follow-up to r175830, which made sure a temporary object region
created for, say, a struct rvalue matched up with the initial bindings
being stored into it. This does the same for the case in which the AST
actually tells us that we need to create a temporary via a
MaterializeObjectExpr. I've unified the two code paths and moved a static
helper function onto ExprEngine.

This also caused a bit of test churn, causing us to go back to describing
temporary regions without a 'const' qualifier. This seems acceptable; it's
our behavior from a few months ago.

<rdar://problem/13265460> (part 2)

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

11 years agoFix regression in modeling assignments of an address of a variable to itself. Fixes...
Ted Kremenek [Fri, 22 Feb 2013 01:39:26 +0000 (01:39 +0000)]
Fix regression in modeling assignments of an address of a variable to itself.  Fixes <rdar://problem/13226577>.

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

11 years agoMake sure we only use the output file as a base for debug splitting
Eric Christopher [Fri, 22 Feb 2013 01:33:46 +0000 (01:33 +0000)]
Make sure we only use the output file as a base for debug splitting
if we're compiling.

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

11 years agoobjective-C arc: Diagnostic can not say to use bridge
Fariborz Jahanian [Fri, 22 Feb 2013 01:22:48 +0000 (01:22 +0000)]
objective-C arc: Diagnostic can not say to use bridge
casts with c++ named casts. Change notes to say use
bridge with c-style cast instead. // rdar://12788838

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

11 years ago[analyzer] Fix buildbot by not reusing a variable name.
Jordan Rose [Fri, 22 Feb 2013 01:08:00 +0000 (01:08 +0000)]
[analyzer] Fix buildbot by not reusing a variable name.

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

11 years agoPreproceessor: fix #if skipping under -traditional-cpp.
Jordan Rose [Fri, 22 Feb 2013 00:32:00 +0000 (00:32 +0000)]
Preproceessor: fix #if skipping under -traditional-cpp.

When parsing directives within skipped #if blocks, we don't want to retain
any whitespace. Previously we were just skipping comments, but it's not
possible to skip comments and retain other whitespace. This change matches
the usual behavior for parsing directives (i.e. the behavior outside of
skipped #if blocks).

<rdar://problem/13267695>

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

11 years agoMake logic smaller.
Eric Christopher [Fri, 22 Feb 2013 00:24:40 +0000 (00:24 +0000)]
Make logic smaller.

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

11 years agoAdded a footnote to the documentation for objc_storeStrong that makes it clear
Michael Gottesman [Fri, 22 Feb 2013 00:16:48 +0000 (00:16 +0000)]
Added a footnote to the documentation for objc_storeStrong that makes it clear
that a __strong object of block type is a valid argument to objc_storeStrong but
that an objc_retain and not an objc_retainBlock will be emitted.

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

11 years agoRemoving has_getDecl (added in r175532). It cause a build break for MSVC, and was...
Aaron Ballman [Fri, 22 Feb 2013 00:15:31 +0000 (00:15 +0000)]
Removing has_getDecl (added in r175532). It cause a build break for MSVC, and was not yet being used in the codebase. If we start using std::enable_if, we can look into resurrecting the idea in a more portable fashion.

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

11 years agoApply the 'nobuiltin' attribute to call sites when the user specifies `-fno-builtin...
Bill Wendling [Fri, 22 Feb 2013 00:13:35 +0000 (00:13 +0000)]
Apply the 'nobuiltin' attribute to call sites when the user specifies `-fno-builtin' on the command line.

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

11 years agoMake for x86 to stop it failing on ARM buildbots.
Bill Wendling [Fri, 22 Feb 2013 00:04:55 +0000 (00:04 +0000)]
Make for x86 to stop it failing on ARM buildbots.

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

11 years agoGrammar.
Eric Christopher [Fri, 22 Feb 2013 00:03:08 +0000 (00:03 +0000)]
Grammar.

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

11 years ago[analyzer] Make sure a temporary object region matches its initial bindings.
Jordan Rose [Thu, 21 Feb 2013 23:57:17 +0000 (23:57 +0000)]
[analyzer] Make sure a temporary object region matches its initial bindings.

When creating a temporary region (say, when a struct rvalue is used as
the base of a member expr), make sure we account for any derived-to-base
casts. We don't actually record these in the LazyCompoundVal that
represents the rvalue, but we need to make sure that the temporary region
we're creating (a) matches the bindings, and (b) matches its expression.

Most of the time this will do exactly the same thing as before, but it
fixes spurious "garbage value" warnings introduced in r175234 by the use
of lazy bindings to model trivial copy constructors.

<rdar://problem/13265460>

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

11 years agoIgnore visibility from enclosing template arguments
John McCall [Thu, 21 Feb 2013 23:42:58 +0000 (23:42 +0000)]
Ignore visibility from enclosing template arguments
for explicit member specializations.

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

11 years agoSimplify code to use castAs rather than getAs + assert.
David Blaikie [Thu, 21 Feb 2013 23:35:06 +0000 (23:35 +0000)]
Simplify code to use castAs rather than getAs + assert.

Post commit review feedback on r175812 from Jordan Rose.

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

11 years agoFix copy/paste to refer to the relevant type (ProgramPoint instead of TypeLoc).
David Blaikie [Thu, 21 Feb 2013 23:35:03 +0000 (23:35 +0000)]
Fix copy/paste to refer to the relevant type (ProgramPoint instead of TypeLoc).

Post commit review feedback on r175812 from Jordan Rose.

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

11 years agoclang/test/Driver/qa_override.c: Appease gcc-driver.
NAKAMURA Takumi [Thu, 21 Feb 2013 23:17:45 +0000 (23:17 +0000)]
clang/test/Driver/qa_override.c: Appease gcc-driver.

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

11 years agoFix typo 'with with' in diagnostic.
Richard Smith [Thu, 21 Feb 2013 23:15:05 +0000 (23:15 +0000)]
Fix typo 'with with' in diagnostic.

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

11 years agoAdd back implicitly dropped const.
David Blaikie [Thu, 21 Feb 2013 22:37:44 +0000 (22:37 +0000)]
Add back implicitly dropped const.

(found due to incoming improvements to llvm::cast machinery that will error on
this sort of mistake)

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

11 years agoFix formatting and tabs in file.
Eric Christopher [Thu, 21 Feb 2013 22:35:08 +0000 (22:35 +0000)]
Fix formatting and tabs in file.

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

11 years agoDon't pass -split-dwarf= to the backend unless we're on linux for
Eric Christopher [Thu, 21 Feb 2013 22:35:05 +0000 (22:35 +0000)]
Don't pass -split-dwarf= to the backend unless we're on linux for
now.

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

11 years agoRemove the SplitDebug action and replace with a set of commands
Eric Christopher [Thu, 21 Feb 2013 22:35:01 +0000 (22:35 +0000)]
Remove the SplitDebug action and replace with a set of commands
in the compilation setup. Note that this doesn't currently
work for -no-integrated-as.

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

11 years agoReplace ProgramPoint llvm::cast support to be well-defined.
David Blaikie [Thu, 21 Feb 2013 22:23:56 +0000 (22:23 +0000)]
Replace ProgramPoint llvm::cast support to be well-defined.

See r175462 for another example/more details.

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

11 years agoRemove superfluous null pointer check. The pointer is used prior to this check.
Ted Kremenek [Thu, 21 Feb 2013 22:10:49 +0000 (22:10 +0000)]
Remove superfluous null pointer check.  The pointer is used prior to this check.

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

11 years agoAST dumping: dump template instantiations only once
Dmitri Gribenko [Thu, 21 Feb 2013 22:01:10 +0000 (22:01 +0000)]
AST dumping: dump template instantiations only once

Fixes infinite loop in PR15220.

Patch by Philip Craig.

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

11 years agoRemove accidentally introduced no-op line.
Daniel Jasper [Thu, 21 Feb 2013 21:40:48 +0000 (21:40 +0000)]
Remove accidentally introduced no-op line.

Was used during experiments, but another if-statements a few lines
before makes it (intentionally) useless.

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

11 years agoTeach serialized diagnostics about notes without locations.
Ted Kremenek [Thu, 21 Feb 2013 21:40:44 +0000 (21:40 +0000)]
Teach serialized diagnostics about notes without locations.

Along the way, improve a diagnostic for "previous declaration here" for implicit parameters.

Fixes <rdar://problem/13211384>.

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

11 years agoConsistently put {} onto the same line for empty functions.
Daniel Jasper [Thu, 21 Feb 2013 21:33:55 +0000 (21:33 +0000)]
Consistently put {} onto the same line for empty functions.

This fixes llvm.org/PR15167.

Before:
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL()
    : AAAAAAAA(10), BBBBBBBBB(10) {
}
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL() : AAAAAAAA(10) {}

After:
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL()
    : AAAAAAAA(10), BBBBBBBBB(10) {}
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL() : AAAAAAAA(10) {}

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

11 years agoReplace CFGElement llvm::cast support to be well-defined.
David Blaikie [Thu, 21 Feb 2013 20:58:29 +0000 (20:58 +0000)]
Replace CFGElement llvm::cast support to be well-defined.

See r175462 for another example/more details.

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

11 years agoPatch for debug info of qualified-id types is 'id'
Fariborz Jahanian [Thu, 21 Feb 2013 20:42:11 +0000 (20:42 +0000)]
Patch for debug info of qualified-id types is 'id'
By Adrian Pranti.

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

11 years agoTry to fix the test for cmake builds, where clang is called clang-3.3.
Benjamin Kramer [Thu, 21 Feb 2013 20:30:05 +0000 (20:30 +0000)]
Try to fix the test for cmake builds, where clang is called clang-3.3.

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

11 years ago[scan-build] Add quotes around clang executable name to handle path withs spaces...
Ted Kremenek [Thu, 21 Feb 2013 20:28:59 +0000 (20:28 +0000)]
[scan-build] Add quotes around clang executable name to handle path withs spaces.  Fixes <rdar://problem/13254727>

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

11 years agoTry to get buildbots to pass these tests.
Bill Wendling [Thu, 21 Feb 2013 19:44:18 +0000 (19:44 +0000)]
Try to get buildbots to pass these tests.

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

11 years ago[scan-build] fix xcode version parsing to handle dot releases. Fixes <rdar://problem...
Ted Kremenek [Thu, 21 Feb 2013 19:33:30 +0000 (19:33 +0000)]
[scan-build] fix xcode version parsing to handle dot releases.  Fixes <rdar://problem/13265300>.

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