]> granicus.if.org Git - clang/log
clang
10 years agoTweak implementation of -Wwrite-strings to better match the behavior of current GCCs:
Richard Smith [Wed, 4 Sep 2013 22:50:31 +0000 (22:50 +0000)]
Tweak implementation of -Wwrite-strings to better match the behavior of current GCCs:

 * In C, as before, if the "warning flag" is enabled, warnings are produced by
   forcing string literals to have const-qualified types (the produced warnings
   are *not* -Wwrite-strings warnings). However, more recent GCCs (at least 4.4
   onwards) now take -w into account here, so we now do the same.

 * In C++, this flag is entirely sane: it behaves just like any other warning
   flag. Stop triggering -fconst-strings here. This is a bit cleaner, but there's
   no real functionality change except in the case where -Xclang -fno-const-strings
   is also specified.

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

10 years agoObjectiveC migrator: start introducing NS_XXX annotations
Fariborz Jahanian [Wed, 4 Sep 2013 22:49:19 +0000 (22:49 +0000)]
ObjectiveC migrator: start introducing NS_XXX annotations
to Method/functions returning ObjC objects. wip.

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

10 years agoReapply r189013 (reverted in r189906) now that the underlying issue is fixed and...
David Blaikie [Wed, 4 Sep 2013 22:03:57 +0000 (22:03 +0000)]
Reapply r189013 (reverted in r189906) now that the underlying issue is fixed and tested (in r189996)

Debug info emission was tripping over an IRGen bug (fixed in r189996)
that was resulting in duplicate emission of static data members of class
templates in namespaces.

We could add more test coverage to debug info for this issue
specifically, but I think the underlying IRGen test is more targeted and
sufficient for the issue.

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

10 years agoDo not emit duplicate global initializers for template static data members inside...
David Blaikie [Wed, 4 Sep 2013 21:07:37 +0000 (21:07 +0000)]
Do not emit duplicate global initializers for template static data members inside namespaces

A quirk of AST representation leads to class template static data member
definitions being visited twice during Clang IRGen resulting in
duplicate (benign) initializers.

Discovered while investigating a possibly-related debug info bug tickled
by the duplicate emission of these members & their associated debug
info.

With thanks to Richard Smith for help investigating, understanding, and
helping with the fix.

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

10 years agoRemove the -fuse-gold-plugin driver option.
Rafael Espindola [Wed, 4 Sep 2013 19:37:35 +0000 (19:37 +0000)]
Remove the -fuse-gold-plugin driver option.

* It was redundant with -flto.
* It was confusing since -uAnythingElse is a different option.
* GCC uses -fuse-linker-plugin, so it was not even a compatibility option.

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

10 years agoObjectiveC migrator. Refactor last patch on
Fariborz Jahanian [Wed, 4 Sep 2013 16:43:57 +0000 (16:43 +0000)]
ObjectiveC migrator. Refactor last patch on
annotations. (was r189892).

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

10 years agoAdds a VSPackage project that builds a VS extension to run clang-format over a select...
Manuel Klimek [Wed, 4 Sep 2013 16:11:46 +0000 (16:11 +0000)]
Adds a VSPackage project that builds a VS extension to run clang-format over a selection / the line at the cursor.

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

10 years agoMore unused warning silencing.
Eric Christopher [Wed, 4 Sep 2013 15:58:55 +0000 (15:58 +0000)]
More unused warning silencing.

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

10 years agoA minor fix in the documentation.
Alexander Kornienko [Wed, 4 Sep 2013 15:14:18 +0000 (15:14 +0000)]
A minor fix in the documentation.

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

10 years agoAdded documentation for clang-format style options.
Alexander Kornienko [Wed, 4 Sep 2013 15:09:13 +0000 (15:09 +0000)]
Added documentation for clang-format style options.

Summary:
The main contents is in the ClangFormatStyleOptions.rst, which can be
updated from the Format.h by the dump_format_style.py script.

Reviewers: djasper, klimek

Reviewed By: klimek

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1597

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

10 years agoASTDumper: fix dump of CXXCatchStmt
Pavel Labath [Wed, 4 Sep 2013 14:35:00 +0000 (14:35 +0000)]
ASTDumper: fix dump of CXXCatchStmt

Summary: I added the display of the VarDecl contained in the statement.

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1596

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

10 years agoCleaned doxygen comments.
Alexander Kornienko [Wed, 4 Sep 2013 14:09:59 +0000 (14:09 +0000)]
Cleaned doxygen comments.

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

10 years agoHandle 'Cpp03' and 'Cpp11' strings in LanguageStandard serialization for
Alexander Kornienko [Wed, 4 Sep 2013 14:09:13 +0000 (14:09 +0000)]
Handle 'Cpp03' and 'Cpp11' strings in LanguageStandard serialization for
consistency of serialized form with the actual enum member names without
a prefix.

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

10 years agoRemove code duplication in unwrapped line parser.
Manuel Klimek [Wed, 4 Sep 2013 13:34:14 +0000 (13:34 +0000)]
Remove code duplication in unwrapped line parser.

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

10 years agoImplement parsing of blocks (^{ ... }) in the unwrapped line parser.
Manuel Klimek [Wed, 4 Sep 2013 13:25:30 +0000 (13:25 +0000)]
Implement parsing of blocks (^{ ... }) in the unwrapped line parser.

This patch makes sure we produce the right number of unwrapped lines,
a follow-up patch will make the whitespace formatting consistent.

Before:
 void f() {
   int i = {[operation setCompletionBlock : ^{ [self onOperationDone];
 }]
 }
 ;
 }

After:
 void f() {
   int i = {[operation setCompletionBlock : ^{
     [self onOperationDone];
   }] };
 }

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

10 years agoMore lambda formatting tests; update test comments.
Manuel Klimek [Wed, 4 Sep 2013 10:06:46 +0000 (10:06 +0000)]
More lambda formatting tests; update test comments.

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

10 years agoclang/test/Driver/working-directory.c: Exclude msys bash rather than tweaking express...
NAKAMURA Takumi [Wed, 4 Sep 2013 09:37:12 +0000 (09:37 +0000)]
clang/test/Driver/working-directory.c: Exclude msys bash rather than tweaking expressions.

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

10 years agoInplement aarch64 neon instructions in AdvSIMD(shift). About 24 shift instructions:
Hao Liu [Wed, 4 Sep 2013 09:29:13 +0000 (09:29 +0000)]
Inplement aarch64 neon instructions in AdvSIMD(shift). About 24 shift instructions:
      sshr,ushr,ssra,usra,srshr,urshr,srsra,ursra,sri,shl,sli,sqshlu,sqshl,uqshl,shrn,sqrshr$
 and 4 convert instructions:
      scvtf,ucvtf,fcvtzs,fcvtzu

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

10 years agoFix layout of lambda captures.
Manuel Klimek [Wed, 4 Sep 2013 08:20:47 +0000 (08:20 +0000)]
Fix layout of lambda captures.

Before:
 int c = [ &, &a, a]{
   [ =, c, &d]{
     return b++;
   }();
 }();

After:
 int c = [&, &a, a] {
   [=, c, &d] {
     return b++;
   }();
 }();

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

11 years agoAttempt to silence some defined but not used warnings.
Eric Christopher [Wed, 4 Sep 2013 06:06:06 +0000 (06:06 +0000)]
Attempt to silence some defined but not used warnings.

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

11 years agoDisable llvm optimizations, but keep -O1 to test available_externally.
Rafael Espindola [Wed, 4 Sep 2013 04:59:11 +0000 (04:59 +0000)]
Disable llvm optimizations, but keep -O1 to test available_externally.

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

11 years agoDisable llvm optimizations, but keep -O1 to test available_externally.
Rafael Espindola [Wed, 4 Sep 2013 04:55:03 +0000 (04:55 +0000)]
Disable llvm optimizations, but keep -O1 to test available_externally.

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

11 years agoUse %clang_cc1.
Rafael Espindola [Wed, 4 Sep 2013 04:51:39 +0000 (04:51 +0000)]
Use %clang_cc1.

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

11 years agoClear LookupResult object if invalid candidate is found.
Serge Pavlov [Wed, 4 Sep 2013 04:50:29 +0000 (04:50 +0000)]
Clear LookupResult object if invalid candidate is found.
If source code is invalid, error recovery can lead to name lookup in a set containing invalid declaration. The lookup is stopped once found such declaration, but LookupResult object could remain in inconsistent state. Its destructor triggered a check, which caused assert violation.
This patch fixes PR16964 and PR12791.

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

11 years agoDon't pass -O0 to clang_cc1, it is the default.
Rafael Espindola [Wed, 4 Sep 2013 04:12:25 +0000 (04:12 +0000)]
Don't pass -O0 to clang_cc1, it is the default.

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

11 years agoclang-cl: Use "clang cl.exe" when disambiguating the diagnostic prefix.
Reid Kleckner [Wed, 4 Sep 2013 03:10:36 +0000 (03:10 +0000)]
clang-cl: Use "clang cl.exe" when disambiguating the diagnostic prefix.

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

11 years agoDocumentation fix: remove advice to use cast/dyn_cast on TypeLocs, updating
James Dennett [Wed, 4 Sep 2013 02:47:23 +0000 (02:47 +0000)]
Documentation fix: remove advice to use cast/dyn_cast on TypeLocs, updating
it to refer to castAs/getAs.

The original change to remove the (broken) cast/dyn_cast support from TypeLoc
was in r175462.  (Thanks to David Blaikie for the reference.)

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

11 years agoRevert "DebugInfo: Remove explicit declaration-emissiong handling now that we have...
David Blaikie [Wed, 4 Sep 2013 02:12:12 +0000 (02:12 +0000)]
Revert "DebugInfo: Remove explicit declaration-emissiong handling now that we have a more principled approach (the 'requires complete type' callback)"

This reverts commit r189013.

This is causing a segfault crash in a test case I have. Reverting while
I investigate the issue.

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

11 years agoclang-cl: Avoid confusing diagnostics when clang-cl is called just cl.exe
Reid Kleckner [Wed, 4 Sep 2013 01:37:22 +0000 (01:37 +0000)]
clang-cl: Avoid confusing diagnostics when clang-cl is called just cl.exe

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

11 years agoOrder initializers of static data members of explicit specializations
Reid Kleckner [Wed, 4 Sep 2013 00:54:24 +0000 (00:54 +0000)]
Order initializers of static data members of explicit specializations

I tried to implement this properly in r189051, but I didn't have enough
test coverage.  Richard kindly provided more test cases than I could
possibly imagine and now we should have the correct condition.

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

11 years agoAdd a diagnostic group for the "ignoring (static|inline) keyword on
Peter Collingbourne [Wed, 4 Sep 2013 00:10:25 +0000 (00:10 +0000)]
Add a diagnostic group for the "ignoring (static|inline) keyword on
explicit template instantiation" warning.

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

11 years agoObjectiveC migrator: Cannot use bridging annotations for
Fariborz Jahanian [Wed, 4 Sep 2013 00:10:06 +0000 (00:10 +0000)]
ObjectiveC migrator: Cannot use bridging annotations for
ObjectiveC methods. Apply specific annotations for them
instead as determined by the static analyzer.

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

11 years agoFix the test on -Asserts build.
Rafael Espindola [Tue, 3 Sep 2013 23:52:53 +0000 (23:52 +0000)]
Fix the test on -Asserts build.

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

11 years agoUse -O0 in this test too.
Rafael Espindola [Tue, 3 Sep 2013 23:31:28 +0000 (23:31 +0000)]
Use -O0 in this test too.

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

11 years agoclang-cl: Make -W a core option so we can adjust clang warnings.
Reid Kleckner [Tue, 3 Sep 2013 23:18:43 +0000 (23:18 +0000)]
clang-cl: Make -W a core option so we can adjust clang warnings.

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

11 years agoDon't run optimizations in a clang test.
Rafael Espindola [Tue, 3 Sep 2013 23:14:03 +0000 (23:14 +0000)]
Don't run optimizations in a clang test.

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

11 years agoParser: support Microsoft syntax for 'typename typedef'
David Majnemer [Tue, 3 Sep 2013 22:36:22 +0000 (22:36 +0000)]
Parser: support Microsoft syntax for 'typename typedef'

Summary:
Transform the token sequence for:
typename typedef T U;

to:
typename T typedef U;

Raise a diagnostic when this happens but only if we succeeded handling
the typename.

Reviewers: rsmith, rnk

Reviewed By: rsmith

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1433

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

11 years agoConsumed analysis: update to comments in test cases.
DeLesley Hutchins [Tue, 3 Sep 2013 22:35:53 +0000 (22:35 +0000)]
Consumed analysis: update to comments in test cases.
Patch by chris.wailes@gmail.com.

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

11 years agoEmit uuid globals as linkonce_odr
Reid Kleckner [Tue, 3 Sep 2013 21:49:32 +0000 (21:49 +0000)]
Emit uuid globals as linkonce_odr

Patch by Nico Rieck!

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

11 years agoReference extension is weird/surprising and unnecessary, let's not do that.
David Blaikie [Tue, 3 Sep 2013 21:40:15 +0000 (21:40 +0000)]
Reference extension is weird/surprising and unnecessary, let's not do that.

Found by Chris Wailes

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

11 years agoSimplify. This function bails out a few lines above if !Found.empty().
Richard Smith [Tue, 3 Sep 2013 21:22:41 +0000 (21:22 +0000)]
Simplify. This function bails out a few lines above if !Found.empty().

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

11 years agoDon't emit an available_externally vtable pointing to linkonce_odr funcs.
Rafael Espindola [Tue, 3 Sep 2013 21:05:13 +0000 (21:05 +0000)]
Don't emit an available_externally vtable pointing to linkonce_odr funcs.

This fixes pr13124.

From the discussion at
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-June/022606.html
we know that we cannot make funcions in a weak_odr vtable also weak_odr. They
should remain linkonce_odr.

The side effect is that we cannot emit a available_externally vtable unless we
also emit a copy of the function. This also has an issue: If codegen is going
to output a function, sema has to mark it used. Given llvm.org/pr9114, it looks
like sema cannot be more aggressive at marking functions used because
of vtables.

This leaves us with a few unpleasant options:

* Marking functions in vtables used if possible. This sounds a bit sloppy, so
  we should avoid it.
* Producing available_externally vtables only when all the functions in it are
  already used or weak_odr. This would cover cases like

--------------------
struct foo {
  virtual ~foo();
};
struct bar : public foo {
  virtual void zed();
};
void f() {
  foo *x(new bar);
  delete x;
}
void g(bar *x) {
  x->~bar(); // force the destructor to be used
}
--------------------------

and

----------------------------------
template<typename T>
struct bar {
  virtual ~bar();
};
template<typename T>
bar<T>::~bar() {
}

// make the destructor weak_odr instead of linkonce_odr
extern template class bar<int>;

void f() {
  bar<int> *x(new bar<int>);
  delete x;
}
----------------------------

These look like corner cases, so it is unclear if it is worth it.

* And finally: Just nuke this optimization. That is what this patch implements.

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

11 years agoSwitched FormatAttr to using an IdentifierArgument instead of a StringArgument since...
Aaron Ballman [Tue, 3 Sep 2013 21:02:22 +0000 (21:02 +0000)]
Switched FormatAttr to using an IdentifierArgument instead of a StringArgument since that is a more accurate modeling.

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

11 years agoRefactor computation of whether a variable declaration's type should be merged
Richard Smith [Tue, 3 Sep 2013 21:00:58 +0000 (21:00 +0000)]
Refactor computation of whether a variable declaration's type should be merged
with a prior declaration. No functionality change intended.

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

11 years agoFix non-void return warning, and format.
Eric Christopher [Tue, 3 Sep 2013 20:43:00 +0000 (20:43 +0000)]
Fix non-void return warning, and format.

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

11 years agoRemove unused typedef.
Eric Christopher [Tue, 3 Sep 2013 20:25:28 +0000 (20:25 +0000)]
Remove unused typedef.

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

11 years agoConsumed analysis: add return_typestate attribute.
DeLesley Hutchins [Tue, 3 Sep 2013 20:11:38 +0000 (20:11 +0000)]
Consumed analysis: add return_typestate attribute.
Patch by chris.wailes@gmail.com

Functions can now declare what state the consumable type the are returning will
be in. This is then used on the caller side and checked on the callee side.
Constructors now use this attribute instead of the 'consumes' attribute.

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

11 years agoARM: Update testcases for improved codegen.
Jim Grosbach [Tue, 3 Sep 2013 20:08:30 +0000 (20:08 +0000)]
ARM: Update testcases for improved codegen.

From llvm r189841.

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

11 years agoUpdate GCC attribute argument parsing comment to better reflect what's going on
Richard Smith [Tue, 3 Sep 2013 18:57:36 +0000 (18:57 +0000)]
Update GCC attribute argument parsing comment to better reflect what's going on
here.

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

11 years agoFactor out parsing and allocation of IdentifierLoc objects.
Richard Smith [Tue, 3 Sep 2013 18:01:40 +0000 (18:01 +0000)]
Factor out parsing and allocation of IdentifierLoc objects.

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

11 years agoAdd an implicit dtor CFG node just before C++ 'delete' expressions.
Jordan Rose [Tue, 3 Sep 2013 17:00:57 +0000 (17:00 +0000)]
Add an implicit dtor CFG node just before C++ 'delete' expressions.

This paves the way for adding support for modeling the destructor of a
region before it is deleted. The statement "delete <expr>" now generates
this series of CFG elements:

  1. <expr>
  2. [B1.1]->~Foo() (Implicit destructor)
  3. delete [B1.1]

Patch by Karthik Bhat!

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

11 years agoAttempt to migrate default dwarf version to 4 for linux.
Eric Christopher [Tue, 3 Sep 2013 16:10:12 +0000 (16:10 +0000)]
Attempt to migrate default dwarf version to 4 for linux.

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

11 years agoPass -target instead of using "REQUIRES: clang-driver".
Rafael Espindola [Tue, 3 Sep 2013 16:05:48 +0000 (16:05 +0000)]
Pass -target instead of using "REQUIRES: clang-driver".

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

11 years agoFirst step towards correctly formatting lambdas.
Manuel Klimek [Tue, 3 Sep 2013 15:10:01 +0000 (15:10 +0000)]
First step towards correctly formatting lambdas.

Implements parsing of lambdas in the UnwrappedLineParser.
This introduces the correct line breaks; the formatting of
lambda captures are still incorrect, and the braces are also
still formatted as if they were braced init lists instead of
blocks.

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

11 years agoRemove useless reinterpret_casts from Stmt.cpp
Pavel Labath [Tue, 3 Sep 2013 14:41:16 +0000 (14:41 +0000)]
Remove useless reinterpret_casts from Stmt.cpp

Summary:
I have no idea why these were there in the first place, but now they are
certainly not necessary.

Reviewers: rsmith

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1581

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

11 years agoRevert "OpenMP: Data-sharing attributes analysis and clause 'shared'"
Rafael Espindola [Tue, 3 Sep 2013 14:33:09 +0000 (14:33 +0000)]
Revert "OpenMP: Data-sharing attributes analysis and clause 'shared'"

This reverts commit r189795.

threadprivate_messages.cpp is faling on windows.

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

11 years agoDisable this on mingw again.
Rafael Espindola [Tue, 3 Sep 2013 14:09:54 +0000 (14:09 +0000)]
Disable this on mingw again.

I will investigate why it still fails, but for now this gets the bots green.

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

11 years agoRemove unused group.
Rafael Espindola [Tue, 3 Sep 2013 13:47:54 +0000 (13:47 +0000)]
Remove unused group.

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

11 years agoUse -### instead of -ccc-print-options.
Rafael Espindola [Tue, 3 Sep 2013 13:26:49 +0000 (13:26 +0000)]
Use -### instead of -ccc-print-options.

Convert the last few tests using -ccc-print-options to -### and remove
-ccc-print-options.

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

11 years agoRemove DynCastMatcher, since it is pretty much the same as Matcher<T>::WrappedMatcher.
Samuel Benzaquen [Tue, 3 Sep 2013 13:21:01 +0000 (13:21 +0000)]
Remove DynCastMatcher, since it is pretty much the same as Matcher<T>::WrappedMatcher.

Summary:
Remove DynCastMatcher, since it is pretty much the same as Matcher<T>::WrappedMatcher.
This reduces the number of template instantiations and number of symbols in the object file.

Reviewers: klimek

CC: cfe-commits, revane
Differential Revision: http://llvm-reviews.chandlerc.com/D1560

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

11 years agoOpenMP: Data-sharing attributes analysis and clause 'shared'
Alexey Bataev [Tue, 3 Sep 2013 12:55:52 +0000 (12:55 +0000)]
OpenMP: Data-sharing attributes analysis and clause 'shared'

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

11 years agoRemove 3 unused ccc options.
Rafael Espindola [Tue, 3 Sep 2013 12:51:46 +0000 (12:51 +0000)]
Remove 3 unused ccc options.

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

11 years agothe call to UsualArithmeticConversions should come after the call to CheckVectorOpera...
Jin-Gu Kang [Mon, 2 Sep 2013 20:32:37 +0000 (20:32 +0000)]
the call to UsualArithmeticConversions should come after the call to CheckVectorOperands on CheckConditionalOperands function. This problem caused compilation error with test17 on "test/CodeGen/ext-vector.c".

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

11 years agoMark that qualifiers can prefix the auto type. This seems to just have
Chandler Carruth [Mon, 2 Sep 2013 19:20:06 +0000 (19:20 +0000)]
Mark that qualifiers can prefix the auto type. This seems to just have
been an oversight, as it definitely works. Every test which changed had
the const written on the LHS of the auto already.

Notably, this also makes things like cpp11-migrate's formation of 'const
auto &' variables much more familiar.

Yes, many people feel that 'const' and other qualifiers belong on the
RHS of the type. I'm not going to argue about that because Clang already
*overwhelming* places the qualifiers on the LHS when it can and on the
RHS when it must. We shouldn't diverge for auto. We should add a tool to
clang-tidy that fixes this in either direction, and then wire up
clang-tidy to tools like cpp11-migrate to fix their placement after
transforms.

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

11 years agoAdded WebKit style to the BasedOnStyle handling and to the relevant help messages.
Alexander Kornienko [Mon, 2 Sep 2013 16:39:23 +0000 (16:39 +0000)]
Added WebKit style to the BasedOnStyle handling and to the relevant help messages.

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

11 years agoWhitespace changes in help messages + updated help output in .rst file.
Alexander Kornienko [Mon, 2 Sep 2013 15:30:26 +0000 (15:30 +0000)]
Whitespace changes in help messages + updated help output in .rst file.

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

11 years agoTrying to fix tests with in-tree builds, that contain a .clang-format files in
Alexander Kornienko [Mon, 2 Sep 2013 14:25:56 +0000 (14:25 +0000)]
Trying to fix tests with in-tree builds, that contain a .clang-format files in
both tools/clang and llvm directories.

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

11 years agoFix gnueeabi typo in tests
Renato Golin [Mon, 2 Sep 2013 14:11:33 +0000 (14:11 +0000)]
Fix gnueeabi typo in tests

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

11 years agoStore first and last newline position in the token text for string literals and comments.
Alexander Kornienko [Mon, 2 Sep 2013 13:58:14 +0000 (13:58 +0000)]
Store first and last newline position in the token text for string literals and comments.

Summary:
Store first and last newline position in the token text for string literals and
comments to avoid doing .find('\n') for each possible solution.

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D1556

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

11 years agoTest for empty .clang-format file.
Alexander Kornienko [Mon, 2 Sep 2013 13:44:16 +0000 (13:44 +0000)]
Test for empty .clang-format file.

Summary: Test clang-format's handling of empty .clang-format files.

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D1562

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

11 years agoclang-format: Fix segfault in overloaded operator parsing.
Daniel Jasper [Mon, 2 Sep 2013 09:20:39 +0000 (09:20 +0000)]
clang-format: Fix segfault in overloaded operator parsing.

Before, constructs like:
  using A::operator+;

caused a segfault. This fixes llvm.org/PR17050.

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

11 years ago[analyzer] Add very limited support for temporary destructors
Pavel Labath [Mon, 2 Sep 2013 09:09:15 +0000 (09:09 +0000)]
[analyzer] Add very limited support for temporary destructors

This is an improved version of r186498. It enables ExprEngine to reason about
temporary object destructors.  However, these destructor calls are never
inlined, since this feature is still broken. Still, this is sufficient to
properly handle noreturn temporary destructors.

Now, the analyzer correctly handles expressions like "a || A()", and executes the
destructor of "A" only on the paths where "a" evaluted to false.

Temporary destructor processing is still off by default and one has to
explicitly request it by setting cfg-temporary-dtors=true.

Reviewers: jordan_rose

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1259

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

11 years agoclang-format: Fix case-indentation in macros.
Daniel Jasper [Mon, 2 Sep 2013 08:26:29 +0000 (08:26 +0000)]
clang-format: Fix case-indentation in macros.

Before:
  #define OPERATION_CASE(name)           \
    case OP_name:                        \
    return operations::Operation##name

After:
  #define OPERATION_CASE(name)           \
    case OP_name:                        \
      return operations::Operation##name

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

11 years agoSwitch the default mode for clang-format to '-file'. Make 'LLVM' the
Chandler Carruth [Mon, 2 Sep 2013 07:42:02 +0000 (07:42 +0000)]
Switch the default mode for clang-format to '-file'. Make 'LLVM' the
fallback syntax used when we fail to find a '.clang-format' file. Adjust
variable names appropriately.

Update the editor integration pieces that specify a '-style' option to
specify it as '-style=file'. I left the functionality in place because
even if the preferred method is to use '.clang-format' files, this way
if someone needs to clobber the style in their editor we show how to do
so in these examples.

Also check in a '.clang-format' file for Clang to ensure that separate
checkouts and builds of Clang from LLVM can still get the nice
formatting. =] This unfortunately required nuking the test for the
absence of a '.clang-format' file as now the directory happening to be
under your clang source tree will cause there to always be a file. ;]

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

11 years agoImproving objc_ownership attribute test coverage.
Aaron Ballman [Sun, 1 Sep 2013 19:11:23 +0000 (19:11 +0000)]
Improving objc_ownership attribute test coverage.

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

11 years agoClean out unused diagnostics.
Benjamin Kramer [Sat, 31 Aug 2013 14:37:34 +0000 (14:37 +0000)]
Clean out unused diagnostics.

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

11 years agoThe diagnostic err_init_conversion_failed uses the enum
Richard Trieu [Sat, 31 Aug 2013 03:50:47 +0000 (03:50 +0000)]
The diagnostic err_init_conversion_failed uses the enum
InitializedEntity::EntityKind as an index for one of its %select.  Over time,
EntityKind has been expanded, but the diagnostic text has not been updated.
This adds additional text to the %select to cover the new enum values.  A
comment has been added to the end of the enum regarding this situation.  This
fixes the crasher in PR17043.

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

11 years agoPossibly appeasing the build bots from r189711
Aaron Ballman [Sat, 31 Aug 2013 01:22:55 +0000 (01:22 +0000)]
Possibly appeasing the build bots from r189711

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

11 years agoConsolidating the notion of a GNU attribute parameter with the attribute argument...
Aaron Ballman [Sat, 31 Aug 2013 01:11:41 +0000 (01:11 +0000)]
Consolidating the notion of a GNU attribute parameter with the attribute argument list.

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

11 years agoTypo.
Eric Christopher [Sat, 31 Aug 2013 00:27:38 +0000 (00:27 +0000)]
Typo.

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

11 years agoAdd initial clang targeted compatible decls for Intrin.h. Step towards
Eric Christopher [Sat, 31 Aug 2013 00:22:48 +0000 (00:22 +0000)]
Add initial clang targeted compatible decls for Intrin.h. Step towards
a windows compatible builtin header.

Currently uses x86intrin.h for implementing intel intrinsics in a clang
specific manner.

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

11 years agoObjectiveC migrator: If we find a method that returns a C pointer
Fariborz Jahanian [Fri, 30 Aug 2013 23:52:08 +0000 (23:52 +0000)]
ObjectiveC migrator: If we find a method that returns a C pointer
of some sort (but not an object, block pointer or CF pointers),
and is not annotated with the objc_returns_inner_pointer attribute,
we should suggest NS_RETURNS_INNER_POINTER annotation for these methods.

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

11 years agoConsumed analysis: add 'consumable' class attribute.
DeLesley Hutchins [Fri, 30 Aug 2013 22:56:34 +0000 (22:56 +0000)]
Consumed analysis: add 'consumable' class attribute.
Patch by chris.wailes@gmail.com

Adds the 'consumable' attribute that can be attached to classes.  This replaces
the previous method of scanning a class's methods to see if any of them have
consumed analysis attributes attached to them.  If consumed analysis attributes
are attached to methods of a class that isn't marked 'consumable' a warning
is generated.

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

11 years ago[analyzer] Treat the rvalue of a forward-declared struct as Unknown.
Jordan Rose [Fri, 30 Aug 2013 19:17:26 +0000 (19:17 +0000)]
[analyzer] Treat the rvalue of a forward-declared struct as Unknown.

This will never happen in the analyzed code code, but can happen for checkers
that over-eagerly dereference pointers without checking that it's safe.
UnknownVal is a harmless enough value to get back.

Fixes an issue added in r189590, caught by our internal buildbot.

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

11 years agoObjectiveC migrator: infer NS_ENUM even when user
Fariborz Jahanian [Fri, 30 Aug 2013 17:46:01 +0000 (17:46 +0000)]
ObjectiveC migrator: infer NS_ENUM even when user
specified NSUInteger as the followup typedef.
With this change, NS_OPTIONS is only inferred
based on looking up how enumerators are speficied
(if they her hexadecimal, power of 2, or have
 bitwise constant expressions).

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

11 years agoReduce the number of symbols by changing how templates are instantiated per function...
Samuel Benzaquen [Fri, 30 Aug 2013 15:09:52 +0000 (15:09 +0000)]
Reduce the number of symbols by changing how templates are instantiated per function bound in the registry.

Summary:
Reduce the number of symbols by changing how templates are instantiated per function bound in the registry.
This change reduces the number of sections in Registry.cpp.o by a little over 10%.

Reviewers: klimek

CC: cfe-commits, revane
Differential Revision: http://llvm-reviews.chandlerc.com/D1557

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

11 years agoAdd support for -march=slm, aka Intel Atom Silvermont.
Benjamin Kramer [Fri, 30 Aug 2013 14:05:34 +0000 (14:05 +0000)]
Add support for -march=slm, aka Intel Atom Silvermont.

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

11 years agoclang-cl: Pass -incremental:no to linker when using ASan
Hans Wennborg [Fri, 30 Aug 2013 10:50:52 +0000 (10:50 +0000)]
clang-cl: Pass -incremental:no to linker when using ASan

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

11 years agoclang-format: Enable formatting of protocol buffer definitions.
Daniel Jasper [Fri, 30 Aug 2013 10:36:58 +0000 (10:36 +0000)]
clang-format: Enable formatting of protocol buffer definitions.

Almost by accident, clang-format seems to be able to format protocol
buffer definitions (https://code.google.com/p/protobuf/).

The only change is that a space is required between numeric constants
and opening square brackets (for default values). While this might in
theory be used for array subscripts (int val = 4[MyArray]), I have not
seen this pattern in practice much. If this is wrong, we can make this
smarter in the future.

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

11 years agoclang-format: Improve recovery from enums with errors.
Daniel Jasper [Fri, 30 Aug 2013 10:10:19 +0000 (10:10 +0000)]
clang-format: Improve recovery from enums with errors.

Before:
  namespace n {
  enum Type {
    One,
    Two, // missing };
    int i;
  } void g() {
  }

After:
  namespace n {
  enum Type {
    One,
    Two, // missing };
    int i;
  }
  void g() {}

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

11 years agoRevert r188531: "Windows ToolChain: add VS bin dir to PogramPaths"
Hans Wennborg [Fri, 30 Aug 2013 09:42:06 +0000 (09:42 +0000)]
Revert r188531: "Windows ToolChain: add VS bin dir to PogramPaths"

This never really worked. Even if we find and execute link.exe in the VS bin dir
this way, link.exe wouldn't find the DLLs it needs, libraries, etc.

It also causes trouble when the user has multiple versions of VS installed,
one of them is in the path, but this code finds the other one (PR17041).

Revert until we can fix this properly.

> Windows ToolChain: add VS bin dir to PogramPaths
>
> We have a lot of fancy logic to find Visual Studio, which is currently used
> to set the system header include paths.
>
> Use the same code to set the ProgramPaths, which is used for finding programs
> such as link.exe. Previously, Clang would just search PATH for link.exe,
> but now it should find it if it's able to find Visual Studio.

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

11 years agoRevert r189649 because it was breaking sanitizer bots.
Yunzhong Gao [Fri, 30 Aug 2013 08:53:09 +0000 (08:53 +0000)]
Revert r189649 because it was breaking sanitizer bots.

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

11 years agoSema: avoid reuse of Exprs when synthesizing operator=
Pavel Labath [Fri, 30 Aug 2013 08:52:28 +0000 (08:52 +0000)]
Sema: avoid reuse of Exprs when synthesizing operator=

Summary:
Previously, Sema was reusing parts of the AST when synthesizing an assignment
operator, turning it into a AS-dag. This caused problems for the static
analyzer, which assumed an expression appears in the tree only once.

Here I make sure to always create a fresh Expr, when inserting something into
the AST, fixing PR16745 in the process.

Reviewers: doug.gregor

CC: cfe-commits, jordan_rose
Differential Revision: http://llvm-reviews.chandlerc.com/D1425

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

11 years agoclang-format: Fix incorrect indentation.
Daniel Jasper [Fri, 30 Aug 2013 08:29:25 +0000 (08:29 +0000)]
clang-format: Fix incorrect indentation.

Before:
aaaaaaaaaa(bbbbbbbbbbbbbbbbbbbbbbbbb.ccccccccccccccccc(
               dddddddddddddddddddddddddddddd));
aaaaaaaaaaa(bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb(
    dddddddddddddddddddddddddddddd));

After:
aaaaaaaaaaa(bbbbbbbbbbbbbbbbbbbbbbbbb.ccccccccccccccccc(
    dddddddddddddddddddddddddddddd));
aaaaaaaaaaa(bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb(
    dddddddddddddddddddddddddddddd));

This was overlooked when interducing the new builder-type call
detection in r189337. Also, some minor reorganization of a test.

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

11 years agoclang-format: Don't indent builders relative to "return".
Daniel Jasper [Fri, 30 Aug 2013 07:27:13 +0000 (07:27 +0000)]
clang-format: Don't indent builders relative to "return".

While this looks kind of nice, it wastes horizontal space and does not
seem to be common in the LLVM codebase.

Before:
  return llvm::StringSwitch<Reference::Kind>(name)
      .StartsWith(".eh_frame_hdr", ORDER_EH_FRAMEHDR)
      .StartsWith(".eh_frame", ORDER_EH_FRAME)
      .StartsWith(".init", ORDER_INIT)
      .StartsWith(".fini", ORDER_FINI)
      .StartsWith(".hash", ORDER_HASH)
      .Default(ORDER_TEXT);

After:
  return llvm::StringSwitch<Reference::Kind>(name)
             .StartsWith(".eh_frame_hdr", ORDER_EH_FRAMEHDR)
             .StartsWith(".eh_frame", ORDER_EH_FRAME)
             .StartsWith(".init", ORDER_INIT)
             .StartsWith(".fini", ORDER_FINI)
             .StartsWith(".hash", ORDER_HASH)
             .Default(ORDER_TEXT);

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

11 years agoclang-format: Fix corner case in builder-type calls.
Daniel Jasper [Fri, 30 Aug 2013 07:12:40 +0000 (07:12 +0000)]
clang-format: Fix corner case in builder-type calls.

Before:
  aaaaaaaaaaaaa->aaaaaaaaaaaaaaaaaaaaaaaa()->aaaaaaaaaaaaaae(
                                                 0)->aaaaaaaaaaaaaaa();

After:
  aaaaaaaaaaaaa->aaaaaaaaaaaaaaaaaaaaaaaa()
      ->aaaaaaaaaaaaaae(0)
      ->aaaaaaaaaaaaaaa();

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

11 years agoFixing a bug where debug info for a local variable gets emitted at file scope.
Yunzhong Gao [Fri, 30 Aug 2013 05:37:02 +0000 (05:37 +0000)]
Fixing a bug where debug info for a local variable gets emitted at file scope.

The patch was discussed in Phabricator. See:
http://llvm-reviews.chandlerc.com/D1281

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

11 years agoMention in AST dump whether a class declaration is a definition.
Richard Smith [Fri, 30 Aug 2013 05:32:29 +0000 (05:32 +0000)]
Mention in AST dump whether a class declaration is a definition.

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

11 years agoDon't eagerly load all conversion operators when loading a class declaration
Richard Smith [Fri, 30 Aug 2013 04:46:40 +0000 (04:46 +0000)]
Don't eagerly load all conversion operators when loading a class declaration
from a PCH/module.

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

11 years agoSimplify slightly.
Richard Smith [Fri, 30 Aug 2013 04:45:38 +0000 (04:45 +0000)]
Simplify slightly.

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