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

11 years ago[Modules] Cope better with top-level declarations loaded after being declared in...
Douglas Gregor [Mon, 11 Feb 2013 18:16:18 +0000 (18:16 +0000)]
[Modules] Cope better with top-level declarations loaded after being declared in the current translation unit <rdar://problem/13189985>.

These two related tweaks to keep the information associated with a
given identifier correct when the identifier has been given some
top-level information (say, a top-level declaration) and more
information is then loaded from a module. The first ensures that an
identifier that was "interesting" before being loaded from an AST is
considered to be different from its on-disk counterpart. Otherwise, we
lose such changes when writing the current translation unit as a
module.

Second, teach the code that injects AST-loaded names into the
identifier chain for name lookup to keep the most recent declaration,
so that we don't end up confusing our declaration chains by having a
different declaration in there.

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

11 years agoFormatter: Detect ObjC message expressions after 'in' in loop
Nico Weber [Mon, 11 Feb 2013 15:32:15 +0000 (15:32 +0000)]
Formatter: Detect ObjC message expressions after 'in' in loop

Before:
  for (id foo in[self getStuffFor : bla]) {
  }

Now:
  for (id foo in [self getStuffFor:bla]) {
  }

"in" is treated as loop keyword if the line starts with "for", and as a
regular identifier else. To check for "in", its IdentifierInfo is handed
through a few layers.

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

11 years agoGet rid of manual debug output, now that the test runner supports it.
Manuel Klimek [Mon, 11 Feb 2013 12:37:30 +0000 (12:37 +0000)]
Get rid of manual debug output, now that the test runner supports it.

You can run tests with -debug instead now.

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

11 years agoFix invalid formatting with spaces before trailing comments.
Daniel Jasper [Mon, 11 Feb 2013 12:36:37 +0000 (12:36 +0000)]
Fix invalid formatting with spaces before trailing comments.

In google style, trailing comments are separated by two spaces. This
patch fixes the counting of these spaces and prevents clang-format from
creating a line with 81 columns.

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

11 years agoFixes handling of empty lines in macros.
Manuel Klimek [Mon, 11 Feb 2013 12:33:24 +0000 (12:33 +0000)]
Fixes handling of empty lines in macros.

Now correctly formats:
 #define A \
   \
   b;
to
 #define A b;

Added the state whether an unwrapped line is a macro to the debug
output.

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

11 years agoUpdate test to not fail with attribute groups.
Bill Wendling [Mon, 11 Feb 2013 08:35:52 +0000 (08:35 +0000)]
Update test to not fail with attribute groups.

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

11 years agoFix formatting of overloaded operator definitions.
Daniel Jasper [Mon, 11 Feb 2013 08:01:18 +0000 (08:01 +0000)]
Fix formatting of overloaded operator definitions.

Before:
operatorvoid*();
operator vector< A< A>>();

After:
operator void *();
operator vector<A<A> >();

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

11 years agoDo not use VariadicDynCastAllOfMatcher where VariadicAllOfMatcher works.
Manuel Klimek [Mon, 11 Feb 2013 07:45:01 +0000 (07:45 +0000)]
Do not use VariadicDynCastAllOfMatcher where VariadicAllOfMatcher works.

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

11 years agoFormatter: Remove now-unneeded code for formatting ':'s in ObjC method decls.
Nico Weber [Sun, 10 Feb 2013 21:08:31 +0000 (21:08 +0000)]
Formatter: Remove now-unneeded code for formatting ':'s in ObjC method decls.

The more general code for formatting ObjC method exprs does this and more,
it's no longer necessary to special-case this. No behavior change.

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

11 years agoFormatter: Add a test for multi-line ObjC dict literals.
Nico Weber [Sun, 10 Feb 2013 20:48:24 +0000 (20:48 +0000)]
Formatter: Add a test for multi-line ObjC dict literals.

As it turns out, this already works reasonably well.

This example from http://clang.llvm.org/docs/ObjectiveCLiterals.html
NSDictionary *dictionary = @{
    @"name" : NSUserName(),
    @"date" : [NSDate date],
    @"processInfo" : [NSProcessInfo processInfo]
};

is formatted like
NSDictionary *dictionary = @{ @"name" : NSUserName(), @"date" : [NSDate date],
                              @"processInfo" : [NSProcessInfo processInfo] };

There's already a FIXME in NestedStaticInitializers about supporting one
initializer per line, which is really all that's missing here too.

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

11 years agoFormatter: Add another ObjC literal test.
Nico Weber [Sun, 10 Feb 2013 20:39:05 +0000 (20:39 +0000)]
Formatter: Add another ObjC literal test.

(From http://clang.llvm.org/docs/ObjectiveCLiterals.html.)

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

11 years agoFormatter: Initial support for ObjC dictionary literals.
Nico Weber [Sun, 10 Feb 2013 20:35:35 +0000 (20:35 +0000)]
Formatter: Initial support for ObjC dictionary literals.

Before:
  @{
  foo:
    bar
  }
  ;

Now:
  @{ foo : bar };

parseBracedList() already does the right thing from an UnwrappedLineParser
perspective, so check for "@{" in all loops that process constructs that can
contain expressions and call parseBracedList() if found.

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

11 years agoUse -mno-implicit-float by default for kernel/kext code. <rdar://13177960>
Bob Wilson [Sun, 10 Feb 2013 16:01:41 +0000 (16:01 +0000)]
Use -mno-implicit-float by default for kernel/kext code. <rdar://13177960>

Apple's kernel engineers have been expecting this behavior even though
we've never implemented it before, as far as I can tell. In recent months,
clang has gotten better at using vector instructions to optimize memcpy-like
operations, and that has exposed problems when vector/floating-point
instructions are used in kexts that don't support that. This behavior also
matches what Apple's GCC did for PowerPC targets.

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

11 years agoDelete an extra blank line.
Bob Wilson [Sun, 10 Feb 2013 16:01:38 +0000 (16:01 +0000)]
Delete an extra blank line.

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

11 years agoRecognize -mno-implicit-float option for x86 as well as ARM. <rdar://13180731>
Bob Wilson [Sun, 10 Feb 2013 15:25:44 +0000 (15:25 +0000)]
Recognize -mno-implicit-float option for x86 as well as ARM. <rdar://13180731>

For x86 targets, we've been using the -msoft-float option to control passing
the no-implicit-float option to cc1. Since the -mno-implicit-float option is
now accepted by the driver, this just makes it work for x86 the same as it
does for ARM targets.

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

11 years agoUse static functions instead of an unnamed namespace
Dmitri Gribenko [Sun, 10 Feb 2013 11:54:22 +0000 (11:54 +0000)]
Use static functions instead of an unnamed namespace

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

11 years agoReformat formatter code. No functionality change.
Nico Weber [Sun, 10 Feb 2013 04:38:23 +0000 (04:38 +0000)]
Reformat formatter code. No functionality change.

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

11 years agoFormatter: Detect ObjC array literals.
Nico Weber [Sun, 10 Feb 2013 02:08:05 +0000 (02:08 +0000)]
Formatter: Detect ObjC array literals.

Use this to add a space after "@[" and before "]" for now.

Later, I want to use this to format multi-line array literals nicer, too.

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

11 years agoobjective-C: Fixes a bogus warning due to not setting
Fariborz Jahanian [Sun, 10 Feb 2013 00:16:04 +0000 (00:16 +0000)]
objective-C: Fixes a bogus warning due to not setting
the "nonatomic" attribute in property redeclaration
in class extension. Also, improved on diagnostics in
this area while at it. // rdar://13156292

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

11 years agoFormatter: Add test for default arguments.
Nico Weber [Sat, 9 Feb 2013 18:02:07 +0000 (18:02 +0000)]
Formatter: Add test for default arguments.

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

11 years agoFileCheck'ize tests
Dmitri Gribenko [Sat, 9 Feb 2013 16:41:47 +0000 (16:41 +0000)]
FileCheck'ize tests

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

11 years agoFileCheck'ize a test
Dmitri Gribenko [Sat, 9 Feb 2013 16:25:38 +0000 (16:25 +0000)]
FileCheck'ize a test

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

11 years agoRemove unreachable statement
Dmitri Gribenko [Sat, 9 Feb 2013 15:24:28 +0000 (15:24 +0000)]
Remove unreachable statement

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

11 years agoComment parsing: use CharInfo.h
Dmitri Gribenko [Sat, 9 Feb 2013 15:16:58 +0000 (15:16 +0000)]
Comment parsing: use CharInfo.h

This also gives us 0.2% speedup on '-fsyntax-only -Wdocumentation' time for
a testcase that consists of all Clang headers.

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

11 years agolibclang: use CXCursor getters to simplify code
Dmitri Gribenko [Sat, 9 Feb 2013 14:12:09 +0000 (14:12 +0000)]
libclang: use CXCursor getters to simplify code

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

11 years agoRemove some stray uses of <ctype.h> functions.
Jordan Rose [Sat, 9 Feb 2013 10:09:43 +0000 (10:09 +0000)]
Remove some stray uses of <ctype.h> functions.

These are causing assertions on some MSVC builds.

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

11 years agoQoI: -Wreadonly-iboutlet-property should have the warning's location on the property.
Ted Kremenek [Sat, 9 Feb 2013 07:13:16 +0000 (07:13 +0000)]
QoI: -Wreadonly-iboutlet-property should have the warning's location on the property.

There's no need to refer to the @implementation at all.

Fixes <rdar://problem/13186515>

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

11 years agoRelease notes: mention support for Unicode and UCNs in identifiers.
Jordan Rose [Sat, 9 Feb 2013 02:12:23 +0000 (02:12 +0000)]
Release notes: mention support for Unicode and UCNs in identifiers.

I'm using the name "Extended Identifiers" for the feature because that's
what GCC calls them. According to the standard, the new feature is
"universal character names are now allowed in identifiers", but the more
interesting "feature" is that identifiers can now contain Unicode characters,
however they are written.

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

11 years agoEnsure that type definitions present in just-loaded modules are
Douglas Gregor [Sat, 9 Feb 2013 01:35:03 +0000 (01:35 +0000)]
Ensure that type definitions present in just-loaded modules are
visible.

The basic problem here is that a given translation unit can use
forward declarations to form pointers to a given type, say,

  class X;
  X *x;

and then import a module that includes a definition of X:

  import XDef;

We will then fail when attempting to access a member of X, e.g.,

  x->method()

because the AST reader did not know to look for a default of a class
named X within the new module.

This implementation is a bit of a C-centric hack, because the only
definitions that can have this property are enums, structs, unions,
Objective-C classes, and Objective-C protocols, and all of those are
either visible at the top-level or can't be defined later. Hence, we
can use the out-of-date-ness of the name and the identifier-update
mechanism to force the update.

In C++, we will not be so lucky, and will need a more advanced
solution, because the definitions could be in namespaces defined in
two different modules, e.g.,

  // module 1
  namespace N { struct X; }

  // module 2
  namespace N { struct X { /* ... */ }; }

One possible implementation here is for C++ to extend the information
associated with each identifier table to include the declaration IDs
of any definitions associated with that name, regardless of
context. We would have to eagerly load those definitions.

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

11 years agoclang/lib/StaticAnalyzer/Core/BugReporter.cpp: Appease old msvc in std::pair(0, 0).
NAKAMURA Takumi [Sat, 9 Feb 2013 01:22:23 +0000 (01:22 +0000)]
clang/lib/StaticAnalyzer/Core/BugReporter.cpp: Appease old msvc in std::pair(0, 0).

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

11 years agoProperly validate UCNs for C99 and C++03 (both more restrictive than C(++)11).
Jordan Rose [Sat, 9 Feb 2013 01:10:25 +0000 (01:10 +0000)]
Properly validate UCNs for C99 and C++03 (both more restrictive than C(++)11).

Add warnings under -Wc++11-compat, -Wc++98-compat, and -Wc99-compat when a
particular UCN is incompatible with a different standard, and -Wunicode when
a UCN refers to a surrogate character in C++03.

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

11 years ago[analyzer] Invalidation checker: move the "missing implementation" check
Anna Zaks [Sat, 9 Feb 2013 01:09:27 +0000 (01:09 +0000)]
[analyzer] Invalidation checker: move the "missing implementation" check

The missing definition check should be in the same category as the
missing ivar validation - in this case, the intent is to invalidate in
the given class, as described in the declaration, but the implementation
does not perform the invalidation. Whereas the MissingInvalidationMethod
checker checks the cases where the method intention is not to
invalidate. The second checker has potential to have a much higher false
positive rate.

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

11 years ago[analyzer] Move DefaultBool so that all checkers can share it.
Anna Zaks [Fri, 8 Feb 2013 23:55:50 +0000 (23:55 +0000)]
[analyzer] Move DefaultBool so that all checkers can share it.

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

11 years ago[analyzer] Split IvarInvalidation into two checkers
Anna Zaks [Fri, 8 Feb 2013 23:55:47 +0000 (23:55 +0000)]
[analyzer] Split IvarInvalidation into two checkers

Separate the checking for the missing invalidation methods into a
separate checker so that it can be turned on/off independently.

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

11 years ago[analyzer] IvarInvalidation: refactor, pull out the diagnostic printing
Anna Zaks [Fri, 8 Feb 2013 23:55:45 +0000 (23:55 +0000)]
[analyzer] IvarInvalidation: refactor, pull out the diagnostic printing

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

11 years ago[analyzer] IvarInvalidation: add annotation for partial invalidation
Anna Zaks [Fri, 8 Feb 2013 23:55:43 +0000 (23:55 +0000)]
[analyzer] IvarInvalidation: add annotation for partial invalidation

The new annotation allows having methods that only partially invalidate
IVars and might not be called from the invalidation methods directly
(instead, are guaranteed to be called before the invalidation occurs).
The checker is going to trust the programmer to call the partial
invalidation method before the invalidator.This is common in cases when
partial object tear down happens before the death of the object.

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

11 years agoobjective-C: don't issue bogus warning about
Fariborz Jahanian [Fri, 8 Feb 2013 23:32:30 +0000 (23:32 +0000)]
objective-C: don't issue bogus warning about
"auto-synthesized may not work correctly with 'nib' loader"
when 'readonly' property is redeclared 'readwrite' in class
extension. // rdar://13123861

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

11 years agoCharInfo: Add missing "using namespace clang::charinfo" in .cpp file.
Jordan Rose [Fri, 8 Feb 2013 22:37:49 +0000 (22:37 +0000)]
CharInfo: Add missing "using namespace clang::charinfo" in .cpp file.

Should fix the MSC bot.

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

11 years agoExcise <cctype> from Clang (except clang-tblgen) in favor of CharInfo.h.
Jordan Rose [Fri, 8 Feb 2013 22:30:41 +0000 (22:30 +0000)]
Excise <cctype> from Clang (except clang-tblgen) in favor of CharInfo.h.

Nearly all of these changes are one-to-one replacements; the few that
aren't have to do with custom identifier validation.

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

11 years agoSimplify logic for avoiding concatenation after numeric constants.
Jordan Rose [Fri, 8 Feb 2013 22:30:31 +0000 (22:30 +0000)]
Simplify logic for avoiding concatenation after numeric constants.

I threw in a couple of test cases for UD-suffixes -- already working, but
it wasn't immediately obvious to me.

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

11 years agoStmtPrinter: Write large char values using \u or \U.
Jordan Rose [Fri, 8 Feb 2013 22:30:27 +0000 (22:30 +0000)]
StmtPrinter: Write large char values using \u or \U.

This may not always be valid, but we were previously just
emitting them raw.

While here, s/isprint/isPrintable/ (using the new CharInfo).

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

11 years agoPull Lexer's CharInfo table out for general use throughout Clang.
Jordan Rose [Fri, 8 Feb 2013 22:30:22 +0000 (22:30 +0000)]
Pull Lexer's CharInfo table out for general use throughout Clang.

Rewriting the same predicates over and over again is bad for code size and
code maintainence. Using the functions in <ctype.h> is generally unsafe
unless they are specified to be locale-independent (i.e. only isdigit and
isxdigit).

The next commit will try to clean up uses of <ctype.h> functions within Clang.

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

11 years agoNote that checker-271 is newer than the analyzer in Xcode 4.6
Ted Kremenek [Fri, 8 Feb 2013 22:19:43 +0000 (22:19 +0000)]
Note that checker-271 is newer than the analyzer in Xcode 4.6

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

11 years agoUpdate open source checker build to checker-271.
Ted Kremenek [Fri, 8 Feb 2013 22:18:26 +0000 (22:18 +0000)]
Update open source checker build to checker-271.

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

11 years agoAlways keep highest identifier, selector, and macro IDs when we've
Douglas Gregor [Fri, 8 Feb 2013 21:30:59 +0000 (21:30 +0000)]
Always keep highest identifier, selector, and macro IDs when we've
read another one, just as we do for types.

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

11 years agoNever cache the result of a module file lookup.
Douglas Gregor [Fri, 8 Feb 2013 21:27:45 +0000 (21:27 +0000)]
Never cache the result of a module file lookup.

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

11 years agoFix indentation-detection at indent level 0.
Manuel Klimek [Fri, 8 Feb 2013 19:53:32 +0000 (19:53 +0000)]
Fix indentation-detection at indent level 0.

This correctly formats:
  {
    a;
  }
where { is incorrectly indented by 2, but is at level 0, when
reformatting only 'a;'.

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

11 years agoTeach BugReporter (extensive diagnostics) to emit a diagnostic when a loop body is...
Ted Kremenek [Fri, 8 Feb 2013 19:51:43 +0000 (19:51 +0000)]
Teach BugReporter (extensive diagnostics) to emit a diagnostic when a loop body is skipped.

Fixes <rdar://problem/12322528>.

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

11 years ago[libclang] Add a test to make sure annotation works fine in the presence of
Argyrios Kyrtzidis [Fri, 8 Feb 2013 19:27:23 +0000 (19:27 +0000)]
[libclang] Add a test to make sure annotation works fine in the presence of
'override' on the method.

This was fixed in a previous commit, generally handling attributes that are at the
end of the declaration.

rdar://13140589

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

11 years agoRemove stale instance variable.
Ted Kremenek [Fri, 8 Feb 2013 18:59:17 +0000 (18:59 +0000)]
Remove stale instance variable.

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

11 years agoobjective-C modern translation: Fix another random translation bug
Fariborz Jahanian [Fri, 8 Feb 2013 18:57:50 +0000 (18:57 +0000)]
objective-C modern translation: Fix another random translation bug
involving property getter expressions on rhs of property setter.
// rdar://13138459

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

11 years agoTakes the context into account when re-indenting regions.
Manuel Klimek [Fri, 8 Feb 2013 17:38:27 +0000 (17:38 +0000)]
Takes the context into account when re-indenting regions.

Fixes llvm.org/PR14916.

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

11 years agoobjective-C modern translator. Fixes a trivial
Fariborz Jahanian [Fri, 8 Feb 2013 17:15:07 +0000 (17:15 +0000)]
objective-C modern translator. Fixes a trivial
rewriting bug where #ifdef ended up on the same
line as the attribute declaration.

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

11 years agoFix handling of fake parenthesis during formatting.
Daniel Jasper [Fri, 8 Feb 2013 16:49:27 +0000 (16:49 +0000)]
Fix handling of fake parenthesis during formatting.

They are much easier to handle when attached to the previous token.

Before:
unsigned Indent =
    formatFirstToken(TheLine.First, IndentForLevel[TheLine.Level] >=
                                    0 ? IndentForLevel[TheLine.Level]
: TheLine.Level * 2, TheLine.InPPDirective, PreviousEndOfLineColumn);

After:
unsigned Indent = formatFirstToken(
    TheLine.First, IndentForLevel[TheLine.Level] >= 0
                       ? IndentForLevel[TheLine.Level] : TheLine.Level * 2,
    TheLine.InPPDirective, PreviousEndOfLineColumn);

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

11 years agoImplement a tiny expression parser to improve formatting decisions.
Daniel Jasper [Fri, 8 Feb 2013 15:28:42 +0000 (15:28 +0000)]
Implement a tiny expression parser to improve formatting decisions.

With this patch, the formatter introduces 'fake' parenthesis according
to the operator precedence of binary operators.

Before:
return aaaa & AAAAAAAAAAAAAAAAAAAAAAAAAAAAA || bbbb &
       BBBBBBBBBBBBBBBBBBBBBBBBBBBBB || cccc & CCCCCCCCCCCCCCCCCCCCCCCCCC ||
       dddd & DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD;
f(aaaaaaaaaaaaaaaaaaaa && aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &&
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa && aaaaaaaaaaaaaaaaaaaa);

After:
return aaaa & AAAAAAAAAAAAAAAAAAAAAAAAAAAAA ||
       bbbb & BBBBBBBBBBBBBBBBBBBBBBBBBBBBB ||
       cccc & CCCCCCCCCCCCCCCCCCCCCCCCCC ||
       dddd & DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD;
f(aaaaaaaaaaaaaaaaaaaa && aaaaaaaaaaaaaaaaaaaa,
  aaaaaaaaaaaaaaaaaaaa && aaaaaaaaaaaaaaaaaaaa,
  aaaaaaaaaaaaaaaaaaaa && aaaaaaaaaaaaaaaaaaaa);

Future improvements:
- Get rid of some of the hacky ways to nicely format certain constructs.
- Merge this parser and the AnnotatingParser as we now have several parsers
  that analyze (), [], etc.

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

11 years agoAvoid unnecessary line breaks in nested ObjC calls.
Daniel Jasper [Fri, 8 Feb 2013 08:22:00 +0000 (08:22 +0000)]
Avoid unnecessary line breaks in nested ObjC calls.

Before:
  [pboard setData:[NSData dataWithBytes:&button
                                 length:sizeof(button)]
          forType:kBookmarkButtonDragType];
After:
  [pboard setData:[NSData dataWithBytes:&button length:sizeof(button)]
          forType:kBookmarkButtonDragType];

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

11 years agoImprove filechecking of volatile test.
Tim Northover [Fri, 8 Feb 2013 08:00:13 +0000 (08:00 +0000)]
Improve filechecking of volatile test.

My previous attempt was extremely deficient, allowing more volatiles
to be introduced and not even checking all of the ones that are
present.

This attempt doesn't try to keep track of the values stored or offsets
within particular objects, just that the correct objects are accessed
in a correctly volatile manner throughout.

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

11 years agoCMake: Include Clang unit tests in check-clang target in standalone builds.
Jordan Rose [Fri, 8 Feb 2013 07:28:25 +0000 (07:28 +0000)]
CMake: Include Clang unit tests in check-clang target in standalone builds.

Also, remove CLANG_BUILD_TESTS option. It won't have consistent behavior
between standalone and non-standalone builds, so I'm not going to bother
hooking it up for standalone builds. LLVM_BUILD_TESTS will continue to
control unit test inclusion in the "all" target in non-standalone builds.

Finally, fix the default value of CLANG_INCLUDE_TESTS, which was being set
to the boolean value of "LLVM_INCLUDE_TESTS", i.e. OFF, rather than actually
reading the variable ${LLVM_INCLUDE_TESTS}! If you picked up my earlier
commit, YOU WILL HAVE TO MANUALLY SET THIS OPTION BACK ON. My apologies!

Part two of r174691 (allow the unit tests to be built in standalone mode).

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

11 years agoFix test failure by making sure this file isn't identical to any other file
Nick Lewycky [Fri, 8 Feb 2013 02:38:30 +0000 (02:38 +0000)]
Fix test failure by making sure this file isn't identical to any other file
included in the same test. Clang gets confused about whether it's already built
a module for this file, when running on a content-addressible filesystem.

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

11 years agoCMake: Optionally allow running the Clang unit tests in standalone builds.
Jordan Rose [Fri, 8 Feb 2013 01:42:37 +0000 (01:42 +0000)]
CMake: Optionally allow running the Clang unit tests in standalone builds.

The reason this is not enabled by default is because there is no way for
Clang to guarantee that the LLVM unit testing infrastruture has been built.
However, if it /has/ been built, there's no reason why the standalone Clang
build can't use it!

This should have no effect on existing builds -- in a combined build the
value of the CLANG_INCLUDE_TESTS option defaults to the LLVM equivalent,
and in a standalone build it defaults to off.

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

11 years agoFix conflict between r174685 and r174645 (rename -fmodule-cache-path <foo> to -fmodul...
Richard Smith [Fri, 8 Feb 2013 01:35:44 +0000 (01:35 +0000)]
Fix conflict between r174685 and r174645 (rename -fmodule-cache-path <foo> to -fmodules-cache-path=<foo>).

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

11 years ago[libclang] Attribute visitation happens out-of-source-order, make sure
Argyrios Kyrtzidis [Fri, 8 Feb 2013 01:12:25 +0000 (01:12 +0000)]
[libclang] Attribute visitation happens out-of-source-order, make sure
we annotate properly when there is an attribute and not skip type specs
if the attribute is after the declaration.

rdar://13129077

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

11 years agoUse the target address space value when mangling names.
Tanya Lattner [Fri, 8 Feb 2013 01:07:32 +0000 (01:07 +0000)]
Use the target address space value when mangling names.

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

11 years agoFix stack overflow and improve performance when a module contains many
Richard Smith [Fri, 8 Feb 2013 00:37:45 +0000 (00:37 +0000)]
Fix stack overflow and improve performance when a module contains many
overloads of a name by claiming that there are no lookup results for that name
in modules while loading the names from the module. Lookups in deserialization
really don't want to find names which they themselves are in the process of
introducing. This also has the pleasant side-effect of automatically caching
PCH lookups which found no names.

The runtime here is still quadratic in the number of overloads, but the
constant is lower.

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

11 years agoobjective-C modern translator. Generate #line
Fariborz Jahanian [Fri, 8 Feb 2013 00:27:34 +0000 (00:27 +0000)]
objective-C modern translator. Generate #line
info in the translated code under -g only.
// rdar://13138170

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

11 years agoTeach subframework header lookup to suggest modules <rdar://problem/13176200>.
Douglas Gregor [Fri, 8 Feb 2013 00:10:48 +0000 (00:10 +0000)]
Teach subframework header lookup to suggest modules <rdar://problem/13176200>.

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

11 years ago[analyzer] Remove redundant check as per Jordan's feedback.
Anna Zaks [Thu, 7 Feb 2013 23:29:22 +0000 (23:29 +0000)]
[analyzer] Remove redundant check as per Jordan's feedback.

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