]> granicus.if.org Git - clang/log
clang
10 years ago[C++11] Replace llvm::next and llvm::prior with std::next and std::prev.
Benjamin Kramer [Sun, 2 Mar 2014 12:20:24 +0000 (12:20 +0000)]
[C++11] Replace llvm::next and llvm::prior with std::next and std::prev.

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

10 years ago[C++11] Remove an LLVM_OVERRIDE use that I missed in my previous commit.
Craig Topper [Sun, 2 Mar 2014 10:02:43 +0000 (10:02 +0000)]
[C++11] Remove an LLVM_OVERRIDE use that I missed in my previous commit.

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

10 years agoSwitch all uses of LLVM_OVERRIDE to just use 'override' directly.
Craig Topper [Sun, 2 Mar 2014 09:32:10 +0000 (09:32 +0000)]
Switch all uses of LLVM_OVERRIDE to just use 'override' directly.

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

10 years agoAdd [extern_c] attribute for modules, allowing a C module to be imported within an...
Richard Smith [Sun, 2 Mar 2014 05:58:18 +0000 (05:58 +0000)]
Add [extern_c] attribute for modules, allowing a C module to be imported within an extern "C" block in C++ code.

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

10 years ago[C++11] Switch from the llvm_move macro to directly calling std::move.
Chandler Carruth [Sun, 2 Mar 2014 04:02:40 +0000 (04:02 +0000)]
[C++11] Switch from the llvm_move macro to directly calling std::move.

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

10 years ago[C++11] Expand and eliminate the LLVM_ENUM_INT_TYPE() macro
Alp Toker [Sun, 2 Mar 2014 03:20:16 +0000 (03:20 +0000)]
[C++11] Expand and eliminate the LLVM_ENUM_INT_TYPE() macro

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

10 years ago[C++11] Drop legacy conditionals for TokenKind's underlying type
Alp Toker [Sun, 2 Mar 2014 02:26:52 +0000 (02:26 +0000)]
[C++11] Drop legacy conditionals for TokenKind's underlying type

This relies on forward declaration of enums.

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

10 years agoMove private classes into anonymous namespaces.
Benjamin Kramer [Sat, 1 Mar 2014 17:21:22 +0000 (17:21 +0000)]
Move private classes into anonymous namespaces.

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

10 years ago[C++11] Replace verbose functors with succinct lambdas
Benjamin Kramer [Sat, 1 Mar 2014 14:48:57 +0000 (14:48 +0000)]
[C++11] Replace verbose functors with succinct lambdas

No functionality change.

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

10 years agoASTReader.h: Prune \param ImportLoc according to r202560. [-Wdocumentation]
NAKAMURA Takumi [Sat, 1 Mar 2014 12:49:14 +0000 (12:49 +0000)]
ASTReader.h: Prune \param ImportLoc according to r202560. [-Wdocumentation]

FIXME: Give appropriate \param to llvm::ArrayRef<SubmoduleID> Overrides.

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

10 years ago[C++11] Remove use of LLVM_HAS_RVALUE_REFERENCES from Clang. This macro
Chandler Carruth [Sat, 1 Mar 2014 09:40:34 +0000 (09:40 +0000)]
[C++11] Remove use of LLVM_HAS_RVALUE_REFERENCES from Clang. This macro
is now always 1, as we're requiring C++11 now!

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

10 years agoFixed an assertion failure related to bitfield lowering.
Warren Hunt [Sat, 1 Mar 2014 00:38:40 +0000 (00:38 +0000)]
Fixed an assertion failure related to bitfield lowering.

When lowering a bitfield, CGRecordLowering would assign the wrong
storage type to a bitfield in some cases and trigger an assertion.  In
these cases the layout was still correct, just the bitfield info was
wrong.

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

10 years agoIf a module A exports a macro M, and a module B imports that macro and #undef's
Richard Smith [Sat, 1 Mar 2014 00:08:04 +0000 (00:08 +0000)]
If a module A exports a macro M, and a module B imports that macro and #undef's
it, importers of B should not see the macro. This is complicated by the fact
that A's macro could also be visible through a different path. The rules (as
hashed out on cfe-commits) are included as a documentation update in this
change.

With this, the number of regressions in libc++'s testsuite when modules are
enabled drops from 47 to 7. Those remaining 7 are also macro-related, and are
due to remaining bugs in this change (in particular, the handling of submodules
is imperfect).

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

10 years agoAdd Clang docs about MSVC compatibility
Reid Kleckner [Fri, 28 Feb 2014 23:46:04 +0000 (23:46 +0000)]
Add Clang docs about MSVC compatibility

This documents some of the status of supported functionality in MSVC
quirks mode.  Some of this should be in
http://clang.llvm.org/compatibility.html instead when things have
stabilized.

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

10 years agoFix leak in MicrosoftVTableContext
Reid Kleckner [Fri, 28 Feb 2014 23:26:22 +0000 (23:26 +0000)]
Fix leak in MicrosoftVTableContext

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

10 years ago[analyzer] Fix for PR18394.
Anton Yartsev [Fri, 28 Feb 2014 22:29:48 +0000 (22:29 +0000)]
[analyzer] Fix for PR18394.

Additional conditions that prevent useful nodes before call from being reclaimed.

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

10 years agoReapply fixed "Honour 'use-external-names' in FileManager"
Ben Langmuir [Fri, 28 Feb 2014 21:16:07 +0000 (21:16 +0000)]
Reapply fixed "Honour 'use-external-names' in FileManager"

Was r202442

There were two issues with the original patch that have now been fixed.
1. We were memset'ing over a FileEntry in a test case. After adding a
   std::string to FileEntry, this still happened to not break for me.
2. I didn't pass the FileManager into the new compiler instance in
   compileModule. This was hidden in some cases by the fact I didn't
   clear the module cache in the test.

Also, I changed the copy constructor for FileEntry, which was memcpy'ing
in a (now) unsafe way.

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

10 years agoTests for lexing of digit separators versus UCNs.
Richard Smith [Fri, 28 Feb 2014 20:13:19 +0000 (20:13 +0000)]
Tests for lexing of digit separators versus UCNs.

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

10 years agoFix a minor bug in lexing pp-numbers with digit separators: if a pp-number contains...
Richard Smith [Fri, 28 Feb 2014 20:06:02 +0000 (20:06 +0000)]
Fix a minor bug in lexing pp-numbers with digit separators: if a pp-number contains "'e+", the pp-number ends between the 'e' and the '+'.

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

10 years agoWhen completing Objective-C instance method invocations, perform a contextual convers...
Anders Carlsson [Fri, 28 Feb 2014 19:07:22 +0000 (19:07 +0000)]
When completing Objective-C instance method invocations, perform a contextual conversion to an Objective-C pointer type of the target expression if needed. This fixes code completion of method invocations where the target is a smart pointer that has an explicit conversion operator to an Objective-C type.

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

10 years agoDon't suggest non-static methods as corrections when they obviously
Kaelyn Uhrain [Fri, 28 Feb 2014 18:12:42 +0000 (18:12 +0000)]
Don't suggest non-static methods as corrections when they obviously
won't work (i.e. when not doing a member lookup and not in a method from
the same class or a descendant class).

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

10 years agoRemoving some unused functionality.
Aaron Ballman [Fri, 28 Feb 2014 18:04:53 +0000 (18:04 +0000)]
Removing some unused functionality.

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

10 years agoAdding a test case to ensure that type attributes applied to the decl-specifier are...
Aaron Ballman [Fri, 28 Feb 2014 14:27:59 +0000 (14:27 +0000)]
Adding a test case to ensure that type attributes applied to the decl-specifier are applied across all declarations in a group.

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

10 years agoNow that llvm's build system sets -install_name, we don't need to.
Rafael Espindola [Fri, 28 Feb 2014 13:50:15 +0000 (13:50 +0000)]
Now that llvm's build system sets -install_name, we don't need to.

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

10 years agoCFG: Also apply the filter to the first block in a FilteredCFGBlockIterator.
Benjamin Kramer [Fri, 28 Feb 2014 11:12:22 +0000 (11:12 +0000)]
CFG: Also apply the filter to the first block in a FilteredCFGBlockIterator.

PR18999.

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

10 years agoAdd 'remark' diagnostic type in 'clang'
Tobias Grosser [Fri, 28 Feb 2014 09:11:08 +0000 (09:11 +0000)]
Add 'remark' diagnostic type in 'clang'

A 'remark' is information that is not an error or a warning, but rather some
additional information provided to the user. In contrast to a 'note' a 'remark'
is an independent diagnostic, whereas a 'note' always depends on another
diagnostic.

A typical use case for remark nodes is information provided to the user, e.g.
information provided by the vectorizer about loops that have been vectorized.

This patch provides the initial implementation of 'remarks'. It includes the
actual definiton of the remark nodes, their printing as well as basic parameter
handling. We are reusing the existing diagnostic parameters which means a remark
can be enabled with normal '-Wdiagnostic-name' flags and can be upgraded to
an error using '-Werror=diagnostic-name'. '-Werror' alone does not upgrade
remarks.

This patch is by intention minimal in terms of parameter handling. More
experience and more discussions will most likely lead to further enhancements
in the parameter handling.

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

10 years ago[ASTUnit] Don't let the preamble diagnostics out-live the CompilerInstance that creat...
Argyrios Kyrtzidis [Fri, 28 Feb 2014 07:11:01 +0000 (07:11 +0000)]
[ASTUnit] Don't let the preamble diagnostics out-live the CompilerInstance that created them,
this is inherently unsafe.

Instead get the diagnostic info into a SourceManager-independent form.

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

10 years agoAdd a testcase for r202437.
Bob Wilson [Fri, 28 Feb 2014 05:57:14 +0000 (05:57 +0000)]
Add a testcase for r202437.

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

10 years agoFix crash with enable_if on constructors.
Nick Lewycky [Fri, 28 Feb 2014 05:26:13 +0000 (05:26 +0000)]
Fix crash with enable_if on constructors.

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

10 years agoAdd support for OpenBSD SPARC assembler.
Rafael Espindola [Fri, 28 Feb 2014 01:55:21 +0000 (01:55 +0000)]
Add support for OpenBSD SPARC assembler.

Patch by Brad Smith.

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

10 years agoAdd a -Wclass-varargs to warn on objects of any class type being passed through an...
Richard Smith [Fri, 28 Feb 2014 01:36:39 +0000 (01:36 +0000)]
Add a -Wclass-varargs to warn on objects of any class type being passed through an ellipsis. Since C++11 relaxed the rules on this, we allow a lot more bad code through silently, such as:

  const char *format = "%s";
  std::experimental::string_view view = "foo";
  printf(format, view);

In this case, not only warn about a class type being used here, but also suggest that calling c_str() might be a good idea.

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

10 years agoAttempt to fix non-MSVC build
Reid Kleckner [Fri, 28 Feb 2014 01:12:55 +0000 (01:12 +0000)]
Attempt to fix non-MSVC build

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

10 years ago-fdump-record-layouts: Sort nvbases by offset before printing them
Reid Kleckner [Fri, 28 Feb 2014 01:03:09 +0000 (01:03 +0000)]
-fdump-record-layouts: Sort nvbases by offset before printing them

It makes our -fdump-record-layouts a little more sane.

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

10 years agoAdd -mcrbits/-mno-crbits to control the PowerPC CR-bit-tracking feature
Hal Finkel [Fri, 28 Feb 2014 00:27:57 +0000 (00:27 +0000)]
Add -mcrbits/-mno-crbits to control the PowerPC CR-bit-tracking feature

The backend currently enables CR-bit tracking by default at -O2 and higher.
These flags allow the user to override that default.

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

10 years ago"&&&" != "&&"
Richard Trieu [Thu, 27 Feb 2014 23:59:14 +0000 (23:59 +0000)]
"&&&" != "&&"

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

10 years agoRevert "Honour 'use-external-names' in FileManager"
Ben Langmuir [Thu, 27 Feb 2014 23:48:03 +0000 (23:48 +0000)]
Revert "Honour 'use-external-names' in FileManager"

Revert r202442, which broke the buildbots.

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

10 years agoHonour 'use-external-names' in FileManager
Ben Langmuir [Thu, 27 Feb 2014 23:27:54 +0000 (23:27 +0000)]
Honour 'use-external-names' in FileManager

Pass through the externally-visible names that we got from the VFS down
to FileManager, and test that this is the name showing up in __FILE__,
diagnostics, and debug information.

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

10 years agoMS ABI: Attempt to fix DenseMap entry reference invalidation
Reid Kleckner [Thu, 27 Feb 2014 22:51:43 +0000 (22:51 +0000)]
MS ABI: Attempt to fix DenseMap entry reference invalidation

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

10 years agoReapply r202420 hopefully fixed for other STLs
Ben Langmuir [Thu, 27 Feb 2014 22:21:32 +0000 (22:21 +0000)]
Reapply r202420 hopefully fixed for other STLs

Keep the copy constructor around, and add a FIXME that we should really
remove it as soon as we have C++11 std::map's emplace function.

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

10 years agoRemove an assertion that no longer holds. <rdar://problem/16135814>
Bob Wilson [Thu, 27 Feb 2014 21:59:17 +0000 (21:59 +0000)]
Remove an assertion that no longer holds. <rdar://problem/16135814>

In r201528, I changed the PGO instrumentation counter for a "do" loop to not
include the fall-through count. That fall-through count is included later, b
it means that this assertion may fail for "do" loops.

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

10 years ago[-Wunreachable-code] always treat 'case:' and 'default:' cases as reachable.
Ted Kremenek [Thu, 27 Feb 2014 21:56:47 +0000 (21:56 +0000)]
[-Wunreachable-code] always treat 'case:' and 'default:' cases as reachable.

This is a heuristic.  Many switch statements, although they look covered
over an enum, may actually handle at runtime more values than in the enum.

This is overly conservative, as there are some cases that clearly
can be ruled as being clearly unreachable, e.g. 'switch (42) { case 1: ... }'.
We can refine this later.

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

10 years ago[CFG] record the original (now unreachable) block of 'case:' and 'default:' cases.
Ted Kremenek [Thu, 27 Feb 2014 21:56:44 +0000 (21:56 +0000)]
[CFG] record the original (now unreachable) block of 'case:' and 'default:' cases.

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

10 years ago[analyzer] check for now possibly null predecessor edge.
Ted Kremenek [Thu, 27 Feb 2014 21:56:41 +0000 (21:56 +0000)]
[analyzer] check for now possibly null predecessor edge.

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

10 years agoFix -Wunused-function in Release build.
Rui Ueyama [Thu, 27 Feb 2014 20:50:04 +0000 (20:50 +0000)]
Fix -Wunused-function in Release build.

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

10 years agoDiagnose attempts to apply ms_struct to records with base classes
John McCall [Thu, 27 Feb 2014 20:30:49 +0000 (20:30 +0000)]
Diagnose attempts to apply ms_struct to records with base classes
or virtual functions, but permit that error to be downgraded to
a warning (with -Wno-error=incompatible-ms-struct), and officially
support this kind of dual, ABI-mixing layout.

The basic problem here is that projects which use ms_struct are often
not very circumspect about what types they annotate; for example,
some projects enable the pragma in a prefix header and then only
selectively disable it around system header inclusions.  They may
only care about binary compatibility with MSVC for a subset of
those structs, but that doesn't mean they have no binary
compatibility concerns at all for the rest; thus we are essentially
forced into supporting this hybrid ABI.  But it's reasonable for
us to at least point out the places where we're not making
any guarantees.

The original diagnostic was for dynamic classes, i.e. those with
virtual functions or virtual bases; I've extended it to include
all classes with bases, because we are not actually making any
attempt to duplicate MSVC's base subobject layout in ms_struct
(and it is indeed quite different from Itanium, even for
non-virtual bases).

rdar://16178895

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

10 years agoMS ABI: Fix vftable mangling by using the vbtable name algorithm
Reid Kleckner [Thu, 27 Feb 2014 19:40:09 +0000 (19:40 +0000)]
MS ABI: Fix vftable mangling by using the vbtable name algorithm

Summary:
This merges VFPtrInfo and VBTableInfo into VPtrInfo, since they hold
almost the same information.  With that change, the vbtable mangling
code can easily be applied to vftable data and we magically get the
correct, unambiguous vftable names.

Fixes PR17748.

Reviewers: timurrrr, majnemer

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

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

10 years agoRevert "Remove constructors from FileEntry that prevent owning resources"
Ben Langmuir [Thu, 27 Feb 2014 19:20:35 +0000 (19:20 +0000)]
Revert "Remove constructors from FileEntry that prevent owning resources"

This reverts commit r202420, which broke the build.

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

10 years agoRemove constructors from FileEntry that prevent owning resources
Ben Langmuir [Thu, 27 Feb 2014 19:14:03 +0000 (19:14 +0000)]
Remove constructors from FileEntry that prevent owning resources

This cleans up some constructors that would not be safe once FileEntry
owns the storage for its name. These were already suspect, since they
wouldn't work if the FileEntry had an open file descriptor. The only
user for these constructors was in UniqueFileContainer, which wasn't a
very useful abstraction anyway. So it and UniqueDirContainer have been
replaced with std::map<UniqueID, *>.

This change should not affect anything outside the FileManager.

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

10 years agoUse private linkage for globals we already name with \01L and \01l.
Rafael Espindola [Thu, 27 Feb 2014 19:01:11 +0000 (19:01 +0000)]
Use private linkage for globals we already name with \01L and \01l.

In llvm the only semantic difference between internal and private is that llvm
tries to hide private globals my mangling them with a private prefix. Since
the globals changed by this patch already had the magic don't mangle marker,
there should be no change in the generated assembly.

A followup patch should then be able to drop the \01L and \01l prefixes and let
llvm mangle as appropriate.

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

10 years agoSplit FileEntry name vs. isValid
Ben Langmuir [Thu, 27 Feb 2014 17:23:33 +0000 (17:23 +0000)]
Split FileEntry name vs. isValid

This is a small bit of refactoring in preparation for FileEntry owning
the storage for its own name.

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

10 years agoAssert that the name of some internal variables start with \01L or \01l.
Rafael Espindola [Thu, 27 Feb 2014 16:26:32 +0000 (16:26 +0000)]
Assert that the name of some internal variables start with \01L or \01l.

No functionality change. This is just an intermediate patch for changing those
global variables to use private linkage.

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

10 years agolibclang: New functions clang_Type_getNumTemplateArguments,
Dmitri Gribenko [Thu, 27 Feb 2014 16:05:05 +0000 (16:05 +0000)]
libclang: New functions clang_Type_getNumTemplateArguments,
clang_Type_getTemplateArgument

Note that these functions don't handle variadic templates -- see tests.

Patch by Matthieu Nottale and Philippe Daouadi.

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

10 years ago[CMake] Teach build system to build/test compiler-rt with a just-built Clang
Alexey Samsonov [Thu, 27 Feb 2014 09:09:39 +0000 (09:09 +0000)]
[CMake] Teach build system to build/test compiler-rt with a just-built Clang

With this change, one may set LLVM_BUILD_EXTERNAL_COMPILER_RT option
to build compiler-rt libraries with just-built Clang.

  make compiler-rt
in the build tree will build all compiler-rt libraries with just-built Clang
and copy them to the proper location in the Clang resource directory.

  make check-compiler-rt
will run the compiler-rt test suite using just-built Clang and runtime
libraries.

The goal is to make LLVM_BUILD_EXTERNAL_COMPILER_RT the default, so that
we can always build compiler-rt libraries with Clang, not the host compiler,
and for all the platforms Clang can target.

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

10 years ago[OPENMP] First changes for Parsing and Sema for 'omp simd' directive support
Alexey Bataev [Thu, 27 Feb 2014 08:29:12 +0000 (08:29 +0000)]
[OPENMP] First changes for Parsing and Sema for 'omp simd' directive support

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

10 years ago[-Wunreachable-code] Don't warn about trivially unreachable return statements precede...
Ted Kremenek [Thu, 27 Feb 2014 06:32:32 +0000 (06:32 +0000)]
[-Wunreachable-code] Don't warn about trivially unreachable return statements preceded by 'noreturn' functions.

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

10 years agoFix test case indentation.
Ted Kremenek [Thu, 27 Feb 2014 06:32:28 +0000 (06:32 +0000)]
Fix test case indentation.

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

10 years ago[-Wunreachable-code] Don't warn about unreachable 'default:' cases.
Ted Kremenek [Thu, 27 Feb 2014 05:42:07 +0000 (05:42 +0000)]
[-Wunreachable-code] Don't warn about unreachable 'default:' cases.

They are covered by -Wcovered-switch-default.

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

10 years ago[ASTUnit] Fix use-after-free bug in ASTUnit::getMainBufferWithPrecompiledPreamble().
Argyrios Kyrtzidis [Thu, 27 Feb 2014 04:11:59 +0000 (04:11 +0000)]
[ASTUnit] Fix use-after-free bug in ASTUnit::getMainBufferWithPrecompiledPreamble().

With r197755 we started reading the contents of buffer file entries, but the
buffers may point to ASTReader blobs that have been disposed.

Fix this by having the CompilerInstance object keep a reference to the ASTReader
as well as having the ASTContext keep reference to the ExternalASTSource.

This was very difficult to construct a test case for.
rdar://16149782

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

10 years agoChange this test to not try to emit any IR. (It should fail to, but it tries to creat...
Nick Lewycky [Thu, 27 Feb 2014 03:29:38 +0000 (03:29 +0000)]
Change this test to not try to emit any IR. (It should fail to, but it tries to create an output file before encountering the error.)

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

10 years agoAs of r202325, CFGBlock predecessors may be NULL. Ignore such preds. Fixes a crasher...
Nick Lewycky [Thu, 27 Feb 2014 02:43:25 +0000 (02:43 +0000)]
As of r202325, CFGBlock predecessors may be NULL. Ignore such preds. Fixes a crasher, PR18983.

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

10 years agoAdd category test case for attribute 'objc_protocol_requires_explicit_implementation'.
Ted Kremenek [Thu, 27 Feb 2014 01:28:58 +0000 (01:28 +0000)]
Add category test case for attribute 'objc_protocol_requires_explicit_implementation'.

This test also illustrates that checking for properties is not working properly with
this attribute, as we are missing a diagnostic for a property not being implemented.

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

10 years agoPass down the debug emission kind into the compile unit for code
Eric Christopher [Thu, 27 Feb 2014 01:25:08 +0000 (01:25 +0000)]
Pass down the debug emission kind into the compile unit for code
generation purposes.
Paired with a commit to llvm.

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

10 years ago[MS ABI] Error instead of generating bad vftables for certain virtual hierarchies...
Hans Wennborg [Thu, 27 Feb 2014 01:14:31 +0000 (01:14 +0000)]
[MS ABI] Error instead of generating bad vftables for certain virtual hierarchies (PR18967)

Erroring out until we fix the bug means we don't have to keep chasing down
this same miscompile in a bunch of different places.

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

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

10 years agoFix -Wunused-variable in non-assert builds. No functionality change.
Nick Lewycky [Thu, 27 Feb 2014 00:36:00 +0000 (00:36 +0000)]
Fix -Wunused-variable in non-assert builds. No functionality change.

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

10 years agoAdd a 'use-external-names' option to VFS overlay files
Ben Langmuir [Thu, 27 Feb 2014 00:25:12 +0000 (00:25 +0000)]
Add a 'use-external-names' option to VFS overlay files

When true, sets the name of the file to be the name from
'external-contents'. Otherwise, you get the virtual path that the file
was looked up by. This will not affect any non-virtual paths, or fully
virtual paths (for which there is no reasonable 'external' name anyway).

The setting is available globally, but can be overriden on a per-file
basis.

The goal is that this setting will control which path you see in debug
info, diagnostics, etc. which are sensitive to which path is used. That
will come in future patches that pass the name through to FileManager.

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

10 years ago[-Wunreachable-code] Prune out unreachable warnings where a 'break' is preceded by...
Ted Kremenek [Thu, 27 Feb 2014 00:24:08 +0000 (00:24 +0000)]
[-Wunreachable-code] Prune out unreachable warnings where a 'break' is preceded by a call to a 'noreturn' function.

For example:

unreachable();
    break;

This code is idiomatic and defensive.  The fact that 'break' is
unreachable here is not interesting.  This occurs frequently
in LLVM/Clang itself.

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

10 years ago[CFG] encode unreachable block information for would-have-been successors for calls...
Ted Kremenek [Thu, 27 Feb 2014 00:24:05 +0000 (00:24 +0000)]
[CFG] encode unreachable block information for would-have-been successors for calls to 'noreturn' functions.

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

10 years ago[CFG] Encode unreachable block information for successors when visiting 'if' statements.
Ted Kremenek [Thu, 27 Feb 2014 00:24:03 +0000 (00:24 +0000)]
[CFG] Encode unreachable block information for successors when visiting 'if' statements.

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

10 years agoRework CFG edges to encode potentially unreachable edges, instead of just making...
Ted Kremenek [Thu, 27 Feb 2014 00:24:00 +0000 (00:24 +0000)]
Rework CFG edges to encode potentially unreachable edges, instead of just making them NULL.

This is to support some analyses, like -Wunreachable-code, that
will need to recover the original unprunned CFG edges in order
to suppress issues that aren't really bugs in practice.

There are two important changes here:

- AdjacentBlock replaces CFGBlock* for CFG successors/predecessors.
  This has the size of 2 pointers, instead of 1.  This is unlikely
  to have a significant memory impact on Sema since a single
  CFG usually exists at one time, but could impact the memory
  usage of the static analyzer.  This could possibly be optimized
  down to a single pointer with some cleverness.

- Predecessors can now contain null predecessors, which means
  some analyses doing a reverse traversal will need to take into
  account.  This already exists for successors, which contain
  successor slots for specific branch kinds (e.g., 'if') that
  expect a fixed number of successors, even if a branch is
  not reachable.

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

10 years agoFix testcase for PR18962 with an explicit triple
Reid Kleckner [Thu, 27 Feb 2014 00:22:40 +0000 (00:22 +0000)]
Fix testcase for PR18962 with an explicit triple

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

10 years agoPR18962: Fix "Unable to find record layout information for type"
Reid Kleckner [Thu, 27 Feb 2014 00:03:39 +0000 (00:03 +0000)]
PR18962: Fix "Unable to find record layout information for type"

Clang is using llvm::StructType::isOpaque() as a way of signaling if
we've finished record type conversion in
CodeGenTypes::isRecordLayoutComplete().  However, Clang was setting the
body of the type before it finished laying out the type as a base type.
Laying out the %class.C.base LLVM type attempts to convert more types,
eventually recursively attempting to layout 'C' again, at which point we
would say that layout was complete, even though we were still in the
middle of it.

By not setting the body, we correctly signal that layout is not
complete, and things work as expected.

At some point, it might be worth refactoring this to avoid looking at
the LLVM IR types under construction.

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

10 years agoargument -> parameter terminology fixes for FunctionTypeInfo
Alp Toker [Wed, 26 Feb 2014 22:27:52 +0000 (22:27 +0000)]
argument -> parameter terminology fixes for FunctionTypeInfo

This is a continuation of r199686.

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

10 years agoRefactor linkage computation in CGObjCMac.cpp.
Rafael Espindola [Wed, 26 Feb 2014 22:25:45 +0000 (22:25 +0000)]
Refactor linkage computation in CGObjCMac.cpp.

Before this patch the globals were created with the wrong linkage and patched
afterwards. From the comments it looks like something would complain about
having an internal GV with no initializer. At least in clang the verifier will
only run way after we set the initializer, so that is not a problem.

This patch should be a nop. It just figures out the linkage earlier and
converts the old calls to setLinkage to asserts. The only case where that is
not possible is when we first see a weak import that is then implemented. In
that case we have to change the linkage, but that is the only setLinkage left.

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

10 years agoSema: Definition of dllimport globals is not allowed
Nico Rieck [Wed, 26 Feb 2014 21:27:13 +0000 (21:27 +0000)]
Sema: Definition of dllimport globals is not allowed

Upgrades the warning to an error and clarifies the message by treating the
definition as error instead of the attribute.

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

10 years agoAdd newlines to fallback-style description. Patch by Kamal Essoufi\!
Alexander Kornienko [Wed, 26 Feb 2014 15:03:57 +0000 (15:03 +0000)]
Add newlines to fallback-style description. Patch by Kamal Essoufi\!

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

10 years agoAArch64: use less cluttered intrinsic for vtbl/vtbx
Tim Northover [Wed, 26 Feb 2014 11:55:15 +0000 (11:55 +0000)]
AArch64: use less cluttered intrinsic for vtbl/vtbx

The table is always 128-bit so there's no reason to specify it every time we
want the intrinsic.

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

10 years agoAdd a StmtPrinter test for implicit and explicit conversion operator calls.
Benjamin Kramer [Wed, 26 Feb 2014 10:23:43 +0000 (10:23 +0000)]
Add a StmtPrinter test for implicit and explicit conversion operator calls.

Put back a comment that I removed too aggressively.

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

10 years agoFix typo
Tobias Grosser [Wed, 26 Feb 2014 10:21:56 +0000 (10:21 +0000)]
Fix typo

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

10 years ago[CMake] Use target_link_libraries(INTERFACE|PRIVATE) on CMake-2.8.12 to increase...
NAKAMURA Takumi [Wed, 26 Feb 2014 06:53:16 +0000 (06:53 +0000)]
[CMake] Use target_link_libraries(INTERFACE|PRIVATE) on CMake-2.8.12 to increase opportunity for parallel build.

target_link_libraries(INTERFACE) doesn't bring inter-target dependencies in add_library,
although final targets have dependencies to whole dependent libraries.
It makes most libraries can be built in parallel.

target_link_libraries(PRIVATE) is used to shaared library.
Each dependent library is linked to the target.so, and its user will not see its grandchildren.
For example,

  - libclang.so has sufficient libclang*.a(s).
  - c-index-test requires just only libclang.so.

FIXME: lld is tweaked minimally. Adding INTERFACE in each library would be better thing.

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

10 years ago[CMake] Introduce cmake_policy(CMP0022) for target_link_libraries(INTERFACE|PRIVATE).
NAKAMURA Takumi [Wed, 26 Feb 2014 06:45:11 +0000 (06:45 +0000)]
[CMake] Introduce cmake_policy(CMP0022) for target_link_libraries(INTERFACE|PRIVATE).

For now, use both keywords, INTERFACE and PRIVATE via the variable,
  - ${cmake_2_8_12_INTERFACE}
  - ${cmake_2_8_12_PRIVATE}

They could be cleaned up when we introduce 2.8.12.

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

10 years ago[CMake] Use LINK_LIBS instead of target_link_libraries().
NAKAMURA Takumi [Wed, 26 Feb 2014 06:41:29 +0000 (06:41 +0000)]
[CMake] Use LINK_LIBS instead of target_link_libraries().

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

10 years ago[CMake] Apply DEPENDS intrinsics_gen in clangCodeGen.
NAKAMURA Takumi [Wed, 26 Feb 2014 06:33:27 +0000 (06:33 +0000)]
[CMake] Apply DEPENDS intrinsics_gen in clangCodeGen.

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

10 years agoclang/test/CodeGenCXX/debug-info-varargs.cpp: Appease msvc with %itanium_abi_triple.
NAKAMURA Takumi [Wed, 26 Feb 2014 03:30:03 +0000 (03:30 +0000)]
clang/test/CodeGenCXX/debug-info-varargs.cpp: Appease msvc with %itanium_abi_triple.

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

10 years ago80-col and bad line ending fixups.
Eric Christopher [Wed, 26 Feb 2014 02:49:36 +0000 (02:49 +0000)]
80-col and bad line ending fixups.

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

10 years agoPR16074, implement warnings to catch pointer to boolean true and pointer to
Richard Trieu [Wed, 26 Feb 2014 02:36:06 +0000 (02:36 +0000)]
PR16074, implement warnings to catch pointer to boolean true and pointer to
null comparison when the pointer is known to be non-null.

This catches the array to pointer decay, function to pointer decay and
address of variables.  This does not catch address of function since this
has been previously used to silence a warning.

Pointer to bool conversion is under -Wbool-conversion.
Pointer to null comparison is under -Wtautological-pointer-compare, a sub-group
of -Wtautological-compare.

void foo() {
  int arr[5];
  int x;
  // warn on these conditionals
  if (foo);
  if (arr);
  if (&x);
  if (foo == null);
  if (arr == null);
  if (&x == null);

  if (&foo);  // no warning
}

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

10 years ago[analyzer] NonNullParamChecker: don't freak out about nested transparent_unions.
Jordan Rose [Wed, 26 Feb 2014 01:20:19 +0000 (01:20 +0000)]
[analyzer] NonNullParamChecker: don't freak out about nested transparent_unions.

For now, just ignore them. Later, we could try looking through LazyCompoundVals,
but we at least shouldn't crash.

<rdar://problem/16153464>

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

10 years agoAdd -Wabsolute-value, warnings about absolute value functions.
Richard Trieu [Wed, 26 Feb 2014 01:17:28 +0000 (01:17 +0000)]
Add -Wabsolute-value, warnings about absolute value functions.

The warnings fall into three groups.
1) Using an absolute value function of the wrong type, for instance, using the
int absolute value function when the argument is a floating point type.
2) Using the improper sized absolute value function, for instance, using abs
when the argument is a long long.  llabs should be used instead.

From these two cases, an implicit conversion will occur which may cause
unexpected behavior.  Where possible, suggest the proper absolute value
function to use, and which header to include if the function is not available.

3) Taking the absolute value of an unsigned value.  In addition to this warning,
suggest to remove the function call.  This usually indicates a logic error
since the programmer assumed negative values would have been possible.

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

10 years agoAddress review comments for r202185, no functionality changes.
Adrian Prantl [Tue, 25 Feb 2014 23:42:18 +0000 (23:42 +0000)]
Address review comments for r202185, no functionality changes.

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

10 years agoHoist culling of -Wunreachable-code from headers before we even run the analysis.
Ted Kremenek [Tue, 25 Feb 2014 22:35:37 +0000 (22:35 +0000)]
Hoist culling of -Wunreachable-code from headers before we even run the analysis.

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

10 years agoDebug info: Generate debug info for variadic functions.
Adrian Prantl [Tue, 25 Feb 2014 19:38:11 +0000 (19:38 +0000)]
Debug info: Generate debug info for variadic functions.
Paired commit with LLVM.

rdar://problem/13690847

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

10 years agoAdd preprocessed output to ccc-analyzer's accepted language map.
Ted Kremenek [Tue, 25 Feb 2014 19:16:33 +0000 (19:16 +0000)]
Add preprocessed output to ccc-analyzer's accepted language map.

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

10 years agoPretty Printer: Print constexpr and ref qualifiers. Don't print return types on destr...
Benjamin Kramer [Tue, 25 Feb 2014 18:49:49 +0000 (18:49 +0000)]
Pretty Printer: Print constexpr and ref qualifiers. Don't print return types on destructors.

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

10 years agoPass the sparc architecture variant to the assembler.
Roman Divacky [Tue, 25 Feb 2014 18:45:49 +0000 (18:45 +0000)]
Pass the sparc architecture variant to the assembler.

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

10 years agoclang-cl: use -fno-rtti by default
Hans Wennborg [Tue, 25 Feb 2014 18:36:22 +0000 (18:36 +0000)]
clang-cl: use -fno-rtti by default

Generating RTTI in the MS ABI is currently not supported, and the failures
are confusing to users, so let's disable it by default for now.

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

10 years agoGive sparcv9 the ability to set the target cpu. Change it from accepting
Roman Divacky [Tue, 25 Feb 2014 18:35:30 +0000 (18:35 +0000)]
Give sparcv9 the ability to set the target cpu. Change it from accepting
-march which doesnt exist on sparc gcc to -mcpu. While here adjust a
few tests to not write an unused temporary file.

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

10 years agoAdd a driver option -ivfsoverlay
Ben Langmuir [Tue, 25 Feb 2014 18:23:47 +0000 (18:23 +0000)]
Add a driver option -ivfsoverlay

Reads the description of a virtual filesystem from a file and overlays
it over the real file system.

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

10 years agoMS ABI: Just use getTypeInfoInChars to get the field size
Reid Kleckner [Tue, 25 Feb 2014 18:08:48 +0000 (18:08 +0000)]
MS ABI: Just use getTypeInfoInChars to get the field size

This was changed to use manual desugaring and multiplication in r201832
and fixed for multi-dimensional arrays in r201917.  However, it breaks
down in the presence of typedefs.  Rather than attempting to handle all
the desugaring, just go back to calling the generic type info code.

This was discovered while compiling SIInstrWaits.cpp in the R600
backend.

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

10 years agoReapply "Pretty Printer: Fix printing of conversion operator decls and calls."
Benjamin Kramer [Tue, 25 Feb 2014 18:03:55 +0000 (18:03 +0000)]
Reapply "Pretty Printer: Fix printing of conversion operator decls and calls."

There were many additional tests that had the bad behavior baked in.

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

10 years agoRevert "Pretty Printer: Fix printing of conversion operator decls and calls."
Rafael Espindola [Tue, 25 Feb 2014 17:39:16 +0000 (17:39 +0000)]
Revert "Pretty Printer: Fix printing of conversion operator decls and calls."

This reverts commit r202167.

It broke Analysis/auto-obj-dtors-cfg-output.cpp

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

10 years agoUpdate for llvm api change.
Rafael Espindola [Tue, 25 Feb 2014 17:30:40 +0000 (17:30 +0000)]
Update for llvm api change.

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