]> granicus.if.org Git - clang/log
clang
10 years agoASTUnit::getMainBufferWithPrecompiledPreamble: use MD5 hash of the remapped
Dmitri Gribenko [Fri, 20 Dec 2013 00:16:25 +0000 (00:16 +0000)]
ASTUnit::getMainBufferWithPrecompiledPreamble: use MD5 hash of the remapped
files to tell if they were changed since the last time we have computed the
preamble

We used to check only the buffer size, so if the new remapped buffer has the
same size as the previous one, we would think that the buffer did not change,
and we did not rebuild the preambule, which sometimes caused us to crash.

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

10 years agoSimplify code
Dmitri Gribenko [Thu, 19 Dec 2013 23:25:59 +0000 (23:25 +0000)]
Simplify code

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

10 years ago[analyzer] Fix test in previous commit to account for compiler warning.
Jordan Rose [Thu, 19 Dec 2013 23:05:40 +0000 (23:05 +0000)]
[analyzer] Fix test in previous commit to account for compiler warning.

--analyze passes -w, but -cc1 -analyze doesn't. Oops!

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

10 years agoWordsmith "maybe" into "may be" in diagnostic, and move warning under flag.
Ted Kremenek [Thu, 19 Dec 2013 22:47:11 +0000 (22:47 +0000)]
Wordsmith "maybe" into "may be" in diagnostic, and move warning under flag.

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

10 years ago[analyzer] Always use 'bool' as the SValBuilder condition type in C++.
Jordan Rose [Thu, 19 Dec 2013 22:32:39 +0000 (22:32 +0000)]
[analyzer] Always use 'bool' as the SValBuilder condition type in C++.

We have assertions for this, but a few edge cases had snuck through where
we were still unconditionally using 'int'.

<rdar://problem/15703011>

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

10 years agoRemove dead code identified by Aaron Ballman.
Ted Kremenek [Thu, 19 Dec 2013 22:23:12 +0000 (22:23 +0000)]
Remove dead code identified by Aaron Ballman.

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

10 years agoAfter discussing with John McCall, removing the ns_bridged attribute as it is unused.
Aaron Ballman [Thu, 19 Dec 2013 22:12:51 +0000 (22:12 +0000)]
After discussing with John McCall, removing the ns_bridged attribute as it is unused.

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

10 years agoclang-format: Add special case for leading comments in braced lists.
Daniel Jasper [Thu, 19 Dec 2013 21:41:37 +0000 (21:41 +0000)]
clang-format: Add special case for leading comments in braced lists.

A comment following the "{" of a braced list seems to almost always
refer to the first element of the list and thus should be aligned
to it.

Before (with Cpp11 braced list style):
  SomeFunction({  // Comment 1
                   "first entry",
                   // Comment 2
                   "second entry"});
After:
  SomeFunction({// Comment 1
                "first entry",
                // Comment 2
                "second entry"});

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

10 years agoReverting r197715 -- it appears that MSVC is happy with the code, but clang is not.
Aaron Ballman [Thu, 19 Dec 2013 19:39:25 +0000 (19:39 +0000)]
Reverting r197715 -- it appears that MSVC is happy with the code, but clang is not.

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

10 years agoNo longer leaking Argument objects after calling createArgument. However, since an...
Aaron Ballman [Thu, 19 Dec 2013 19:33:35 +0000 (19:33 +0000)]
No longer leaking Argument objects after calling createArgument. However, since an OwningPtr cannot live in a std::vector yet, there are some manual deletions that have a FIXME attached to them. These will go away once C++11 support is allowed.

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

10 years ago[CMake] Tweak r197697 to handle CMake finding the wrong llvm-config/tblgen.
Jordan Rose [Thu, 19 Dec 2013 18:39:05 +0000 (18:39 +0000)]
[CMake] Tweak r197697 to handle CMake finding the wrong llvm-config/tblgen.

- If llvm-config fails, output an error to the user rather than allowing
  errors to cascade.
- Always get llvm-tblgen from llvm-config's bindir.

Turns out my PATH points to a really old version of LLVM; both of these
fell out of trying to make this experience nicer.

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

10 years agoType attribute do not get an AST node by default, so these statements can be removed...
Aaron Ballman [Thu, 19 Dec 2013 18:16:00 +0000 (18:16 +0000)]
Type attribute do not get an AST node by default, so these statements can be removed (it's inherited automatically from TypeAttr).

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

10 years agoRemoving the SourceLocation unused attribute argument type.
Aaron Ballman [Thu, 19 Dec 2013 18:10:57 +0000 (18:10 +0000)]
Removing the SourceLocation unused attribute argument type.

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

10 years agoObjectiveC. Sema test for property, methods
Fariborz Jahanian [Thu, 19 Dec 2013 17:22:23 +0000 (17:22 +0000)]
ObjectiveC. Sema test for property, methods
'section' attribute. // rdar://15450637

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

10 years agocheck-clang: Suppress LLVM_LIT in add_lit_testsuite, for now.
NAKAMURA Takumi [Thu, 19 Dec 2013 17:10:30 +0000 (17:10 +0000)]
check-clang: Suppress LLVM_LIT in add_lit_testsuite, for now.

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

10 years agoSmall simplification: p0 is the same as p.
Rafael Espindola [Thu, 19 Dec 2013 16:54:10 +0000 (16:54 +0000)]
Small simplification: p0 is the same as p.

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

10 years agoclang-format: Increase penalty for breaking comments.
Daniel Jasper [Thu, 19 Dec 2013 16:45:34 +0000 (16:45 +0000)]
clang-format: Increase penalty for breaking comments.

Unexpectedly, it seems that people commonly know what they were doing
when writing a comment.

Also, being more conservative about comment breaking has the advantage
of giving more flexibility. If a linebreak within the comment can
improve formatting, the author can add it (after which clang-format
won't undo it). There is no way to override clang-format's behavior if
it breaks a comment.

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

10 years ago[CMake][Standalone] Rewrite standalone build based on llvm-config. CLANG_PATH_TO_LLVM...
NAKAMURA Takumi [Thu, 19 Dec 2013 16:44:32 +0000 (16:44 +0000)]
[CMake][Standalone] Rewrite standalone build based on llvm-config. CLANG_PATH_TO_LLVM_*(s) are deprecated.

Checked on VS10(multiconfig) and some singleconfig builders.

* Assumptions

  - You should specify llvm-config as LLVM_CONFIG.
    CMake could find one in $PATH by default.

  - ENABLE_ASSERTIONS obeys LLVM's.

* Use cases

  a) With LLVM build tree

    Assume llvm-config is in your build tree.
    Everything should work as ever.

  b) With *installed* LLVM

    Assume distributions. The source tree can be optional.

    b1) The source tree is provided on the location `llvm-config --src-root`

      - Test utils, FileCheck &c., are imported and built in the new tree.
      - Gtest is built in the tree if gtest library is not found.
      - Lit is used in $(SRCROOT)/utils/lit/lit.py.

    b2) The source tree is not provided

      - clang and utilities can be built.
      - All tests, unittests and check-clang are invalidated and not built.

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

10 years agoFix comment typo.
Will Wilson [Thu, 19 Dec 2013 16:24:17 +0000 (16:24 +0000)]
Fix comment typo.

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

10 years agoclang-format: Slightly adapt decision of when to break before <<.
Daniel Jasper [Thu, 19 Dec 2013 16:06:40 +0000 (16:06 +0000)]
clang-format: Slightly adapt decision of when to break before <<.

Before:
  Diag(aaaaaaaaaaaaaaaaaaaaaaaaaaaa) << aaaaaaaaaaaaaaaaaaaaaaaaa(
                                              aaaaaaaaaaaaa);

After:
  Diag(aaaaaaaaaaaaaaaaaaaaaaaaaaaa)
      << aaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaa);

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

10 years ago[CMake] check-clang: Include ClangUnitTests if it can be built. Check existence of...
NAKAMURA Takumi [Thu, 19 Dec 2013 16:05:44 +0000 (16:05 +0000)]
[CMake] check-clang: Include ClangUnitTests if it can be built. Check existence of gtest.h then.

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

10 years ago[CMake] check-clang: Append items to CLANG_TEST_DEPS rather than set. CLANG_TEST_DEPS...
NAKAMURA Takumi [Thu, 19 Dec 2013 16:05:39 +0000 (16:05 +0000)]
[CMake] check-clang: Append items to CLANG_TEST_DEPS rather than set. CLANG_TEST_DEPS can be set in parent scope.

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

10 years ago[CMake] check-clang: Deprecate --path, according to r197576.
NAKAMURA Takumi [Thu, 19 Dec 2013 16:05:34 +0000 (16:05 +0000)]
[CMake] check-clang: Deprecate --path, according to r197576.

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

10 years agoSwitching getAttrs calls over to using a specific_attr_iterator. No functional change...
Aaron Ballman [Thu, 19 Dec 2013 15:35:31 +0000 (15:35 +0000)]
Switching getAttrs calls over to using a specific_attr_iterator. No functional changes intended.

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

10 years agoSwitched code from using hasAttr followed by getAttr to simply call getAttr directly...
Aaron Ballman [Thu, 19 Dec 2013 13:36:16 +0000 (13:36 +0000)]
Switched code from using hasAttr followed by getAttr to simply call getAttr directly and check the resulting value.

No functional changes intended.

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

10 years agoSwitched code from using hasAttr followed by getAttr to simply call getAttr directly.
Aaron Ballman [Thu, 19 Dec 2013 13:20:36 +0000 (13:20 +0000)]
Switched code from using hasAttr followed by getAttr to simply call getAttr directly.

No functional changes intended.

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

10 years agoHosting a call to getAttr so that we don't call it multiple times for the same attrib...
Aaron Ballman [Thu, 19 Dec 2013 13:16:35 +0000 (13:16 +0000)]
Hosting a call to getAttr so that we don't call it multiple times for the same attribute. Also removes a hasAttr that's not required. No functional changes intended.

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

10 years agoFix usage description of clang-format-diff.py.
Daniel Jasper [Thu, 19 Dec 2013 10:21:37 +0000 (10:21 +0000)]
Fix usage description of clang-format-diff.py.

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

10 years agoUpdate SI datalayout for 32-bit private pointers
Matt Arsenault [Thu, 19 Dec 2013 05:33:14 +0000 (05:33 +0000)]
Update SI datalayout for 32-bit private pointers

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

10 years agoSwitched code from using hasAttr followed by getAttr to simply call getAttr directly...
Aaron Ballman [Thu, 19 Dec 2013 03:09:10 +0000 (03:09 +0000)]
Switched code from using hasAttr followed by getAttr to simply call getAttr directly and check the resulting value.

No functional changes intended.

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

10 years agoOn spacv8 f128 is only aligned to 64 bits.
Rafael Espindola [Thu, 19 Dec 2013 03:03:04 +0000 (03:03 +0000)]
On spacv8 f128 is only aligned to 64 bits.

LLVM already got this right.

Found on "Figure 3-1: Scalar Types" on http://sparc.com/standards/psABI3rd.pdf.

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

10 years agoSwitched code from using hasAttr followed by getAttr to simply call getAttr directly...
Aaron Ballman [Thu, 19 Dec 2013 03:02:49 +0000 (03:02 +0000)]
Switched code from using hasAttr followed by getAttr to simply call getAttr directly and check the resulting value.

No functional changes intended.

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

10 years agoSwitched code from using hasAttr followed by getAttr to simply call getAttr directly...
Aaron Ballman [Thu, 19 Dec 2013 02:58:51 +0000 (02:58 +0000)]
Switched code from using hasAttr followed by getAttr to simply call getAttr directly and check the resulting value. Also fixes some minor formatting issues surrounding the getAttr code.

No functional changes intended.

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

10 years agoReplacing calls to getAttr with calls to hasAttr for clarity. No functional change...
Aaron Ballman [Thu, 19 Dec 2013 02:39:40 +0000 (02:39 +0000)]
Replacing calls to getAttr with calls to hasAttr for clarity. No functional change intended -- this only replaces Boolean uses of getAttr.

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

10 years agoPCH: fix a crash caused by a circular deserialization dependency
Dmitri Gribenko [Thu, 19 Dec 2013 02:05:20 +0000 (02:05 +0000)]
PCH: fix a crash caused by a circular deserialization dependency

We started by trying to deserialize decltype(func-param) in a trailing return
type, which causes the function parameter decl to be deserialized, which pulls
in the function decl, which pulls the function type, which pulls the same
decltype() in the return type, and then we crashed.

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

10 years agoSimplify CXXMethodDecl::isVirtual() for __interface case
Dmitri Gribenko [Thu, 19 Dec 2013 01:58:52 +0000 (01:58 +0000)]
Simplify CXXMethodDecl::isVirtual() for __interface case

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

10 years agoDebug info: (Bugfix) emit CRV qualifiers for pointers to member functions.
Adrian Prantl [Thu, 19 Dec 2013 01:38:47 +0000 (01:38 +0000)]
Debug info: (Bugfix) emit CRV qualifiers for pointers to member functions.
rdar://problem/15678916.

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

10 years ago[ms-abi] Update Alignment for VtorDisps
Warren Hunt [Thu, 19 Dec 2013 00:43:59 +0000 (00:43 +0000)]
[ms-abi] Update Alignment for VtorDisps

The alignment impact of the virtual bases apperas to be applied in
order, rather than up front.  This patch adds the new behavior and
provides a test case.

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

10 years agoAdded a comment about the launch_bounds attribute's AST node being required. Since...
Aaron Ballman [Thu, 19 Dec 2013 00:41:31 +0000 (00:41 +0000)]
Added a comment about the launch_bounds attribute's AST node being required. Since there were no test cases for the attribute, some have been added. This promptly demonstrated a bug with the semantic handling, which is also fixed.

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

10 years agoRefactor the Microsoft inheritance attribute handling so that it no longer has specia...
Aaron Ballman [Wed, 18 Dec 2013 23:44:18 +0000 (23:44 +0000)]
Refactor the Microsoft inheritance attribute handling so that it no longer has special treatment. Also fixes a minor bug where the attributes were being parsed as though they were GNU-style attributes when they were in fact keyword attributes.

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

10 years agoFix the DataLayout string produced by clang for NaCl.
Rafael Espindola [Wed, 18 Dec 2013 23:41:04 +0000 (23:41 +0000)]
Fix the DataLayout string produced by clang for NaCl.

Reviewed by Derek Schuff.

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

10 years agoImplemented delayed processing of 'unavailable' checking, just like with 'deprecated'.
Ted Kremenek [Wed, 18 Dec 2013 23:30:06 +0000 (23:30 +0000)]
Implemented delayed processing of 'unavailable' checking, just like with 'deprecated'.

Fixes <rdar://problem/15584219> and <rdar://problem/12241361>.

This change looks large, but all it does is reuse and consolidate
the delayed diagnostic logic for deprecation warnings with unavailability
warnings.  By doing so, it showed various inconsistencies between the
diagnostics, which were close, but not consistent.  It also revealed
some missing "note:"'s in the deprecated diagnostics that were showing
up in the unavailable diagnostics, etc.

This change also changes the wording of the core deprecation diagnostics.
Instead of saying "function has been explicitly marked deprecated"
we now saw "'X' has been been explicitly marked deprecated".  It
turns out providing a bit more context is useful, and often we
got the actual term wrong or it was not very precise
 (e.g., "function" instead of "destructor").  By just saying the name
of the thing that is deprecated/deleted/unavailable we define
this issue away.  This diagnostic can likely be further wordsmithed
to be shorter.

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

10 years agoUse getAsCXXRecordDecl to shorten some gets and casts
Reid Kleckner [Wed, 18 Dec 2013 23:17:05 +0000 (23:17 +0000)]
Use getAsCXXRecordDecl to shorten some gets and casts

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

10 years agoObjectiveC. support "section" attribute on properties
Fariborz Jahanian [Wed, 18 Dec 2013 23:09:57 +0000 (23:09 +0000)]
ObjectiveC. support "section" attribute on properties
and methods. rdar://15450637

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

10 years agoRequire the type of a by-copy capture to be complete before creating its field.
Douglas Gregor [Wed, 18 Dec 2013 23:02:36 +0000 (23:02 +0000)]
Require the type of a by-copy capture to be complete before creating its field.

The problem here is more serious than the fix implies. Adding a field
to a class updates the triviality bits for the class (among other
things). Failing to require a complete type before adding the field
meant that these updates don't happen in the well-formed case where
the capture is an uninstantiated class template specialization,
leading the lambda itself to be treated as having a trivial copy
constructor when it shouldn't. Fixes <rdar://problem/15560464>.

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

10 years agoAdd a test for mipsel-nacl too.
Rafael Espindola [Wed, 18 Dec 2013 22:40:42 +0000 (22:40 +0000)]
Add a test for mipsel-nacl too.

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

10 years agoEnhance OpenMP parser tests from r197553 / r197598
Alp Toker [Wed, 18 Dec 2013 22:34:19 +0000 (22:34 +0000)]
Enhance OpenMP parser tests from r197553 / r197598

Move some of the verifier directives away from the end of the pragma line.

This ensures that the diagnostics relate to the trailing token being tested and
not the verifier comments which are themselves part of the token stream.

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

10 years agoDebug info: Implement (rvalue) reference qualifiers for C++11 non-static
Adrian Prantl [Wed, 18 Dec 2013 21:48:18 +0000 (21:48 +0000)]
Debug info: Implement (rvalue) reference qualifiers for C++11 non-static
member functions. Paired commit with LLVM.

rdar://problem/15356637

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

10 years agoAllow Objective-C pointer conversions following an explicit user conversion.
Douglas Gregor [Wed, 18 Dec 2013 21:46:16 +0000 (21:46 +0000)]
Allow Objective-C pointer conversions following an explicit user conversion.

Finishes the work started in r194224, and fixes <rdar://problem/15494681>.

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

10 years agoclang-format-diff.py: fix -regex/-iregex matching
Alp Toker [Wed, 18 Dec 2013 21:34:07 +0000 (21:34 +0000)]
clang-format-diff.py: fix -regex/-iregex matching

While debating the finer points of file extension matching, we somehow missed
the bigger problem that the current code will match anything starting with the
default or user-specified pattern (e.g. lit.site.cfg.in).

Fix this by doing what find(1) does, implicitly wrapping the pattern with ^$.

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

10 years agoObjective-C. After providing a fix-it for a
Fariborz Jahanian [Wed, 18 Dec 2013 21:04:43 +0000 (21:04 +0000)]
Objective-C. After providing a fix-it for a
cstring, converted to NSString, produce the
matching AST for it. This also required some
refactoring of the previous code. // rdar://14106083

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

10 years agoMake setABIAPCS and setABIAAPCS easier to reason about.
Rafael Espindola [Wed, 18 Dec 2013 20:24:51 +0000 (20:24 +0000)]
Make setABIAPCS and setABIAAPCS easier to reason about.

These functions now always set the same variables in the same order and they
don't overlap with thep constructor.

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

10 years agoSplit setABI in two helpers. No functionality change.
Rafael Espindola [Wed, 18 Dec 2013 19:47:32 +0000 (19:47 +0000)]
Split setABI in two helpers. No functionality change.

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

10 years agoFix OpenMP recovery with trailing tokens following the pragma
Alp Toker [Wed, 18 Dec 2013 19:10:54 +0000 (19:10 +0000)]
Fix OpenMP recovery with trailing tokens following the pragma

The recovery was failing due to a missing case in SkipUntil().

Also add back tests from r197553 that were reverted in the previous commit.

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

10 years agoRevert "[OPENMP] Fix for parsing OpenMP directives with extra braces, brackets and...
Alp Toker [Wed, 18 Dec 2013 19:10:49 +0000 (19:10 +0000)]
Revert "[OPENMP] Fix for parsing OpenMP directives with extra braces, brackets and parens"

These parser changes were redundant. The same or better recovery can be
achieved with a one-line fix to SkipUntil() due to land in the next commit.

This reverts commit r197553.

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

10 years agoAdding a win32-targeted test into Tooling/multi-jobs.cpp, to make sure it doesn't...
Artyom Skrobov [Wed, 18 Dec 2013 18:55:36 +0000 (18:55 +0000)]
Adding a win32-targeted test into Tooling/multi-jobs.cpp, to make sure it doesn't get broken again
(prompted by NAKAMURA Takumi)

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

10 years agocheck-clang: Fixup r197576, to replace CMAKE_CFG_INTDIR on clang_tools_dir.
NAKAMURA Takumi [Wed, 18 Dec 2013 18:25:13 +0000 (18:25 +0000)]
check-clang: Fixup r197576, to replace CMAKE_CFG_INTDIR on clang_tools_dir.

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

10 years agoOpenCL: Do not force 64 bit floats for (embedded) targets with only 32bit floats.
Pekka Jaaskelainen [Wed, 18 Dec 2013 18:15:03 +0000 (18:15 +0000)]
OpenCL: Do not force 64 bit floats for (embedded) targets with only 32bit floats.

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

10 years agoObjectiveC. Fixes the sentence in a diagnostic.
Fariborz Jahanian [Wed, 18 Dec 2013 16:51:06 +0000 (16:51 +0000)]
ObjectiveC. Fixes the sentence in a diagnostic.
// rdar://15397430

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

10 years agoclang-format parts of the file.
Rafael Espindola [Wed, 18 Dec 2013 16:38:48 +0000 (16:38 +0000)]
clang-format parts of the file.

I am about to send a patch for review touching these and clang-formating first
makes the patch much easier to read.

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

10 years agoImplement the MSABI and SysVABI calling conventions for Objective-C method declaratio...
Aaron Ballman [Wed, 18 Dec 2013 16:23:37 +0000 (16:23 +0000)]
Implement the MSABI and SysVABI calling conventions for Objective-C method declarations. This appears to be an omission from r189644.

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

10 years agoAdding some comments about AST node requirements for attributes which create AST...
Aaron Ballman [Wed, 18 Dec 2013 15:59:41 +0000 (15:59 +0000)]
Adding some comments about AST node requirements for attributes which create AST nodes but never actually make use of them. No functional changes.

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

10 years agoWhitespace cleanup.
Rafael Espindola [Wed, 18 Dec 2013 15:52:38 +0000 (15:52 +0000)]
Whitespace cleanup.

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

10 years agoRemove OpenCL-specific type keywords and specifiers
Alp Toker [Wed, 18 Dec 2013 15:29:05 +0000 (15:29 +0000)]
Remove OpenCL-specific type keywords and specifiers

This commit kills off custom type specifier and keyword handling of OpenCL C
data types.

Although the OpenCL spec describes them as keywords, we can handle them more
elegantly as predefined types. This should provide better error correction and
code completion as well as simplifying the implementation.

The primary intention is however to simplify the C/C++ parser and save some
packed bits on AST structures that had been extended in r170432 just for
OpenCL.

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

10 years agoAdd -f64:32:64 to the darwin ppc32 DataLayout.
Rafael Espindola [Wed, 18 Dec 2013 15:16:50 +0000 (15:16 +0000)]
Add -f64:32:64 to the darwin ppc32 DataLayout.

A f64 inside a struct can be 32 bit aligned on darwin.

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

10 years agocheck-clang: Introduce clang_tools_dir in lit.site.cfg, for clang separated from...
NAKAMURA Takumi [Wed, 18 Dec 2013 15:08:56 +0000 (15:08 +0000)]
check-clang: Introduce clang_tools_dir in lit.site.cfg, for clang separated from llvm.

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

10 years agoclang/test/CMakeLists.txt: Prune CLANG_SOURCE_DIR and CLANG_BINARY_DIR. They are...
NAKAMURA Takumi [Wed, 18 Dec 2013 15:08:49 +0000 (15:08 +0000)]
clang/test/CMakeLists.txt: Prune CLANG_SOURCE_DIR and CLANG_BINARY_DIR. They are set at top.

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

10 years agoclang-format: Fix indentation corner case.
Daniel Jasper [Wed, 18 Dec 2013 10:44:36 +0000 (10:44 +0000)]
clang-format: Fix indentation corner case.

Before:
  aaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)
                 .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);
  aaaaaaaaaa = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)
                   .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa();

After:
  aaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
                 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)
                 .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);
  aaaaaaaaaa = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
                   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)
                   .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa();

Probably still not ideal, but should be a step into the right direction.

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

10 years ago[OPENMP] Fix for parsing OpenMP directives with extra braces, brackets and parens
Alexey Bataev [Wed, 18 Dec 2013 08:46:25 +0000 (08:46 +0000)]
[OPENMP] Fix for parsing OpenMP directives with extra braces, brackets and parens

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

10 years agoclang-format: Fix ObjC method expr in binary expressions.
Daniel Jasper [Wed, 18 Dec 2013 07:08:51 +0000 (07:08 +0000)]
clang-format: Fix ObjC method expr in binary expressions.

Before:
  bool a = ([aaaaaaaa aaaaa] == aaaaaaaaaaaaaaaaa || [aaaaaaaa aaaaa] ==
                                                         aaaaaaaaaaaaaaaaaaaa);

After:
  bool a = ([aaaaaaaa aaaaa] == aaaaaaaaaaaaaaaaa ||
            [aaaaaaaa aaaaa] == aaaaaaaaaaaaaaaaaaaa);

This fixes llvm.org/PR18271.

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

10 years agoUse arm-nacl-gnueabi instead of arm-nacl to match the previous tests.
Rafael Espindola [Wed, 18 Dec 2013 04:53:17 +0000 (04:53 +0000)]
Use arm-nacl-gnueabi instead of arm-nacl to match the previous tests.

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

10 years agoSplit this test into one per supporter nacl arch.
Rafael Espindola [Wed, 18 Dec 2013 04:35:56 +0000 (04:35 +0000)]
Split this test into one per supporter nacl arch.

Right now clang produces the same DataLayout for all of them, but it could, for
example, add 'n' specifications when the end architecture is given.

No functionality change, this should just make future changes easier to read.

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

10 years agoPrint the 'p' specification before the 'i' specification.
Rafael Espindola [Wed, 18 Dec 2013 04:14:53 +0000 (04:14 +0000)]
Print the 'p' specification before the 'i' specification.

No functionality change.

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

10 years agoFix comment-code function name mismatch
Hans Wennborg [Wed, 18 Dec 2013 01:39:59 +0000 (01:39 +0000)]
Fix comment-code function name mismatch

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

10 years agoclang-format-diff.py: add the OpenCL file extension
Alp Toker [Wed, 18 Dec 2013 00:58:58 +0000 (00:58 +0000)]
clang-format-diff.py: add the OpenCL file extension

It's handled correctly as a C-family language.

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

10 years agoObjectiveC. typo fix in my last patch,
Fariborz Jahanian [Wed, 18 Dec 2013 00:52:54 +0000 (00:52 +0000)]
ObjectiveC. typo fix in my last patch,
per Jordan's review.

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

10 years agoAdd a 's' specifications to AArch64.
Rafael Espindola [Tue, 17 Dec 2013 23:30:58 +0000 (23:30 +0000)]
Add a 's' specifications to AArch64.

This has no functionality change as clang adds explicit alignment info for
byval arguments. The only difference is that now the clang produced
DataLayout string for AArch64 is identical to the LLVM produced one.

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

10 years agoMove some more test-and-consumes over to TryConsumeToken()
Alp Toker [Tue, 17 Dec 2013 23:29:36 +0000 (23:29 +0000)]
Move some more test-and-consumes over to TryConsumeToken()

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

10 years agoObjctive-C. warn if dealloc is being overridden in
Fariborz Jahanian [Tue, 17 Dec 2013 22:44:28 +0000 (22:44 +0000)]
Objctive-C. warn if dealloc is being overridden in
a category implementation. // rdar://15397430

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

10 years agoDocumentation comment parsing: when checking if we have typedef to something
Dmitri Gribenko [Tue, 17 Dec 2013 22:22:14 +0000 (22:22 +0000)]
Documentation comment parsing: when checking if we have typedef to something
that we consider a function for the purposes of checking \param and \returns,
look through reference types.

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

10 years agoDocumentation comment parsing: allow \param and \returns on std::function,
Dmitri Gribenko [Tue, 17 Dec 2013 22:06:11 +0000 (22:06 +0000)]
Documentation comment parsing: allow \param and \returns on std::function,
boost::function and similar function-like objects

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

10 years agoNone of these attributes currently make use of an AST node, so setting ASTNode =...
Aaron Ballman [Tue, 17 Dec 2013 21:35:24 +0000 (21:35 +0000)]
None of these attributes currently make use of an AST node, so setting ASTNode = 0 to reduce complexity. No functional change intended.

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

10 years agoUse triples that match the -target-abi option.
Rafael Espindola [Tue, 17 Dec 2013 21:01:22 +0000 (21:01 +0000)]
Use triples that match the -target-abi option.

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

10 years agoUse the integrated assembler by default on FreeBSD/ppc and ppc64.
Roman Divacky [Tue, 17 Dec 2013 20:34:25 +0000 (20:34 +0000)]
Use the integrated assembler by default on FreeBSD/ppc and ppc64.

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

10 years ago[ms-cxxabi] The 'most derived' ctor parameter usually comes last
Reid Kleckner [Tue, 17 Dec 2013 19:46:40 +0000 (19:46 +0000)]
[ms-cxxabi] The 'most derived' ctor parameter usually comes last

Unlike Itanium's VTTs, the 'most derived' boolean or bitfield is the
last parameter for non-variadic constructors, rather than the second.
For variadic constructors, the 'most derived' parameter comes after the
'this' parameter.  This affects constructor calls and constructor decls
in a variety of places.

Reviewers: timurrrr

Differential Revision: http://llvm-reviews.chandlerc.com/D2405

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

10 years agoDocumentation comment parsing: rearrange tests to clarify the intent of these tests
Dmitri Gribenko [Tue, 17 Dec 2013 19:45:12 +0000 (19:45 +0000)]
Documentation comment parsing: rearrange tests to clarify the intent of these tests

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

10 years agoFix line endings in microsoft-dtor-lookup-cxx11.cpp
Hans Wennborg [Tue, 17 Dec 2013 19:39:18 +0000 (19:39 +0000)]
Fix line endings in microsoft-dtor-lookup-cxx11.cpp

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

10 years agoObjective-C. Make diagnostics and fix-its consistent
Fariborz Jahanian [Tue, 17 Dec 2013 19:33:43 +0000 (19:33 +0000)]
Objective-C. Make diagnostics and fix-its consistent
when diagnosing casting of a cstring literal to
NSString in default and -fobjc-arc mode.
// rdar://14106083

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

10 years agoFix strange indentation and remove trailing whitespace on empty lines
Dmitri Gribenko [Tue, 17 Dec 2013 19:28:18 +0000 (19:28 +0000)]
Fix strange indentation and remove trailing whitespace on empty lines

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

10 years agoBring order to the OpenCL keywords
Alp Toker [Tue, 17 Dec 2013 18:17:46 +0000 (18:17 +0000)]
Bring order to the OpenCL keywords

Avoid the gratuitous repurposing of C++ keyword 'private' by using a keyword
alias.

Also attempt to document the OpenCL keywords based on scraps of information
found online.

The purpose of this commit is to reduce impact on the C++ parser.

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

10 years ago[ms-cxxabi] Don't do destructor check on declarations if the dtor is deleted
Hans Wennborg [Tue, 17 Dec 2013 17:49:22 +0000 (17:49 +0000)]
[ms-cxxabi] Don't do destructor check on declarations if the dtor is deleted

We would previously emit redundant diagnostics for the following code:

  struct S {
    virtual ~S() = delete;
    void operator delete(void*, int);
    void operator delete(void*, double);
  } s;

First we would check on ~S() and error about the ambigous delete functions,
and then we would error about using the deleted destructor.

If the destructor is deleted, there's no need to check it.

Also, move the check from Sema::ActOnFields to CheckCompleteCXXClass. These
are run at almost the same time, called from ActOnFinishCXXMemberSpecification.
However, CHeckCompleteCXXClass may mark a defaulted destructor as deleted, and
if that's the case we don't want to check it.

Differential Revision: http://llvm-reviews.chandlerc.com/D2421

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

10 years agoFix indentation from r197490 plus some typos
Alp Toker [Tue, 17 Dec 2013 17:25:19 +0000 (17:25 +0000)]
Fix indentation from r197490 plus some typos

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

10 years agoRemove -f128:128 from the DataLayout strings. It is the default.
Rafael Espindola [Tue, 17 Dec 2013 16:07:35 +0000 (16:07 +0000)]
Remove -f128:128 from the DataLayout strings. It is the default.

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

10 years agoThe PS3 is a ppc64 and has 64 bit registers. Update DataLayout accordingly.
Rafael Espindola [Tue, 17 Dec 2013 15:40:00 +0000 (15:40 +0000)]
The PS3 is a ppc64 and has 64 bit registers. Update DataLayout accordingly.

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

10 years agoRemove -f16:16:32 from the XCore DataLayout string.
Rafael Espindola [Tue, 17 Dec 2013 14:34:42 +0000 (14:34 +0000)]
Remove -f16:16:32 from the XCore DataLayout string.

This makes it identical to the string llvm produces.

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

10 years agoRefactor and micro-optimize ConsumeToken()
Alp Toker [Tue, 17 Dec 2013 14:12:37 +0000 (14:12 +0000)]
Refactor and micro-optimize ConsumeToken()

1) Introduce TryConsumeToken() to handle the common test-and-consume pattern.
   This brings about readability improvements in the parser and optimizes to avoid
   redundant checks in the common case.

2) Eliminate the ConsumeCodeCompletionTok special case from ConsumeToken(). This
   was used by only one caller which has been switched over to the more
   appropriate ConsumeCodeCompletionToken() function.

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

10 years agoSimplify RevertibleTypeTraits as a form of contextual keyword
Alp Toker [Tue, 17 Dec 2013 14:12:30 +0000 (14:12 +0000)]
Simplify RevertibleTypeTraits as a form of contextual keyword

Now that we emit diagnostics for keyword-as-identifier hacks (-Wkeyword-compat)
we can go ahead and simplify some of the old revertible keyword support.

This commit adds a TryIdentKeywordUpgrade() function to mirror the recently
added TryKeywordIdentFallback() and uses it to replace the hard-coded list of
REVERTIBLE_TYPE_TRAITs.

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

10 years agoUpdate comment of changed parameter of ModuleMap constructor.
Daniel Jasper [Tue, 17 Dec 2013 13:21:13 +0000 (13:21 +0000)]
Update comment of changed parameter of ModuleMap constructor.

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

10 years agoclang-format: Don't adapt local format to macros.
Daniel Jasper [Tue, 17 Dec 2013 12:38:55 +0000 (12:38 +0000)]
clang-format: Don't adapt local format to macros.

Formatting this:
   void f() { // 1 space initial indent.
      int i;
  #define A   \
      int i;  \
     int j;
        int k; // Format this line.
   }
   void f() {
       #define A 1 // Format this line.
   }

Before:
   void f() { // 1 space initial indent.
      int i;
  #define A   \
      int i;  \
     int j;
     int k;  // Format this line.
   }
   void f() {
   #define A 1  // Format this line.
   }

After:
   void f() { // 1 space initial indent.
      int i;
  #define A   \
      int i;  \
     int j;
      int k;  // Format this line.
   }
   void f() {
  #define A 1  // Format this line.
   }

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

10 years agoLIBRARY_PATH environment variable should only be supported on a native compiler.
Richard Barton [Tue, 17 Dec 2013 11:11:25 +0000 (11:11 +0000)]
LIBRARY_PATH environment variable should only be supported on a native compiler.

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