Граф коммитов

34035 Коммитов

Автор SHA1 Сообщение Дата
Eric Christopher 7c9b2fdf19 Formatting.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147988 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-12 01:26:51 +00:00
Akira Hatanaka cc66254946 Take into account the pointer to an aggregate that is passed as a hidden
argument when Offset is initialized.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147986 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-12 01:10:09 +00:00
Akira Hatanaka 2afd23da0e Call CodeGenTypes::ConvertType to get LLVM::Type*.
Remove function MipsABIInfo::GetFloatingPointTy.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147985 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-12 00:52:17 +00:00
Eli Friedman ed0b31f847 Fix some edge cases with C++ casts and placeholder expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147984 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-12 00:44:34 +00:00
Fariborz Jahanian 3306f961fa objective-c: fixes a regression in looking up names
in class extensions and categories by recent refactoring
of objc class ASTs. // rdar://1066654


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147982 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-12 00:18:35 +00:00
Matt Beaumont-Gay 5b7254c2c3 Appease -Wnon-virtual-dtor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147977 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-11 22:53:23 +00:00
Douglas Gregor 72b8f78814 Extend test-case as requested by Eli
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147974 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-11 22:43:46 +00:00
Douglas Gregor ec3bd728cc Improve the diagnostic when trying to redefine a typedef with a
variably-modified type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147973 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-11 22:33:48 +00:00
Kaelyn Uhrain dc98cd0cdd Fix the caching in CorrectTypo so that other non-keyword identifiers
are still added if the cached correction fails validation.

Also fix a copy-and-paste error in a comment from my previous commit.
Finally, add an example of the benefit the typo correction callback adds
to TryNamespaceTypoCorrection--which happens to also tickle the above
caching problem, as the only way a non-namespace Decl would be added to
the possible corrections is if it was cached as the correction for a
previous instance of the same typo where the typo was corrected to a
non-namespace via a different code path.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147968 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-11 21:17:51 +00:00
Fariborz Jahanian 3efd348d35 minor refactoring to improve compile-time performance.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147963 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-11 19:48:08 +00:00
Kaelyn Uhrain 7d5e6948e6 Add initial callback object support to Sema::CorrectTypo.
Also includes two examples of the callback: a wrapper/replacement for
the CorrectTypoContext enum, and a conversion of the two calls to
CorrectTypo in SemaDeclCXX.cpp (one of which provides verifiable
improvement to the typo correction, as demonstrated in the added test).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147962 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-11 19:37:46 +00:00
Fariborz Jahanian 015f608042 objc-arc: evaluate 'readonly' property with no known
life-time to that of its backing 'ivar's lifetime.
// rdar://10558871


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147956 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-11 18:26:06 +00:00
Richard Smith de8facc81f constexpr: fix typo resulting in move constructors sometimes not being
implicitly marked constexpr when they should be.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147955 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-11 18:26:05 +00:00
Evgeniy Stepanov 463f13695f More tests for ARM FPU features.
Also remove the svn:eol-style property from the test file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147947 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-11 12:36:39 +00:00
Evgeniy Stepanov 35dd732fdf Fix -mfpu parsing on ARM.
- Support gcc-compatible vfpv3 name in addition to vfp3.
- Support vfpv3-d16.
- Disable neon feature for -mfpu=vfp* (yes, we were emitting Neon instructions
  for those!).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147943 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-11 11:21:31 +00:00
NAKAMURA Takumi 8844f454c7 clang/test/CodeGen/vla-4.c: Relax expression for -Asserts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147934 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-11 08:34:52 +00:00
Abramo Bagnara 5ff53b27df Fixed VLA code generation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147933 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-11 08:19:46 +00:00
Ted Kremenek 3e97758f22 "This change adds alloca/valloc checks to UnixAPIChecker. It includes a small refactoring for
the common *alloc functions as well as a few tiny wibbles (adds a note
to CWE/CERT advisory numbers in the bug output, and fixes a couple
80-column-wide violations.)"

Patch by Austin Seipp!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147931 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-11 08:13:21 +00:00
NAKAMURA Takumi cb28b48fec test/Driver/debug-options-as.c: Mark this as XFAIL:cygwin.
Also cygwin has not supported integrated-as yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147929 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-11 07:50:51 +00:00
Douglas Gregor c0004df84f C11 allows typedefs to be redefined. Implement this in C11 mode, and
downgrade the default-error warning to an ExtWarn in
C90/99. <rdar://problem/10668057>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147925 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-11 04:25:01 +00:00
Eli Friedman 983d835bea Revert changes to lib/Driver in r147917; I didn't mean to commit this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147920 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-11 02:41:15 +00:00
Zhongxing Xu 97a72c35a6 Add elidable CXXConstructExpr as block-level expr. It converts an lvalue to a rvalue, which is a useful step during AST evaluation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147918 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-11 02:39:07 +00:00
Eli Friedman b69b42c55d Start refactoring code for capturing variables and 'this' so that it is shared between lambda expressions and block literals.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147917 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-11 02:36:31 +00:00
John McCall 52f220df13 Typo in test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147905 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-11 01:35:55 +00:00
Ted Kremenek 256ef642f8 Remove '#if 0' from ExprEngine::InlineCall(), and start fresh by wiring up inlining for straight C calls.
My hope is to reimplement this from first principles based on the simplifications of removing unneeded node builders
and re-evaluating how C++ calls are handled in the CFG.  The hope is to turn inlining "on-by-default" as soon as possible
with a core set of things working well, and then expand over time.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147904 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-11 01:06:27 +00:00
John McCall 806054db66 Do placeholder conversions on array bounds in both declarators and
new-expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147900 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-11 00:14:46 +00:00
Akira Hatanaka 9db0a5e7e3 Remove switch/case statements and call GetFloatingPointTy() instead to get the
floating point type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147894 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-10 23:30:49 +00:00
Akira Hatanaka 6d1080fd18 Flatten float complex arguments. N32/64 requires float complex arguments be
passed in floating point registers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147892 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-10 23:12:19 +00:00
Akira Hatanaka 9659d59ec3 Remove space.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147889 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-10 22:44:52 +00:00
Akira Hatanaka 31dfd642d5 Add field IsIEEE in FloatingLiteral to distinguish between different 128-bit
floating point formats.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147887 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-10 22:40:09 +00:00
Douglas Gregor 67310745f3 When something goes wrong in type-checking a namespace definition, make the namespace declaration invalid
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147882 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-10 22:14:10 +00:00
Chandler Carruth b43550bf1b Add support for the androideabi environment to our triple support, and
for the arm-linux-androideabi triple in particular.

Also use this to do a better job of selecting soft FP settings.

Patch by Evgeniy Stepanov.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147872 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-10 19:47:42 +00:00
Fariborz Jahanian 6e6f93a1f1 objc-arc: fixes a crash when trying to find out retaining cycle
ownership of property sent to 'super'. // rdar://10640891


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147868 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-10 19:28:26 +00:00
Chandler Carruth 02577fffaf Remove a set, but unused variable. Found with GCC's warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147864 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-10 18:26:14 +00:00
Anna Zaks d3e29ef3e0 [analyzer] Testing infrastructure: Flush output after every print
statement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147862 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-10 18:10:25 +00:00
Joerg Sonnenberger 91ee4a7f36 Contrary to the other BSDs, NetBSD followed the ELF ABI for structure
passing on i386 and does not use registers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147856 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-10 16:53:17 +00:00
Ted Kremenek f660f4b1be Make PathDiagnosticLocation more resilient to null Stmt pointers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147854 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-10 15:26:13 +00:00
Benjamin Kramer 5660aa6c68 Add definitions for AMD's bobcat (aka btver1)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147849 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-10 11:50:18 +00:00
Benjamin Kramer 5c65e4f8e0 Enable POPCNT and LZCNT with sse4a.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147848 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-10 11:50:13 +00:00
Benjamin Kramer 448f68d7ef Factor the repetitive cpu macro definition into a helper function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147847 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-10 11:50:09 +00:00
Bill Wendling 1bf7a3fcc4 The `-fwritable-strings' flag doesn't make the backing store strings of all
CFStrings writable.

The strings (both Unicode and ASCII) should reside in a read-only section. E.g.,
__TEXT,__cstring instead of __DATA,__data. This is done by making the global
variable created for the strings constant despite the value of that flag.
<rdar://problem/10657500>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147845 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-10 08:46:39 +00:00
Eli Friedman 7ead5c7b6f Implement the missing pieces of Evaluate for _Complex types. With that complete, remove some code from CGExprConstant which is no longer necessary. While I'm here, a couple minor tweaks to _Complex-in-C++. (Specifically, make _Complex types literal types, and don't warn for _Complex int.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147840 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-10 04:58:17 +00:00
Richard Smith 610a60c0e6 PR11724: Implement evaluation for constexpr defaulted trivial union copy/move
constructors. These are a special case whose behavior cannot be modeled as a
user-written constructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147839 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-10 04:32:03 +00:00
Eli Friedman 15e17aed79 Per John's comment, it makes sense to ask isLambda on any CXXRecordDecl; make sure that's safe. Get rid of a check which is now unnecessary in Sema::getFunctionLevelDeclContext().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147837 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-10 03:38:46 +00:00
Argyrios Kyrtzidis 510037b4c2 [arcmt] XFAIL on mingw.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147830 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-10 02:39:29 +00:00
Richard Smith bdad7a2e21 Update C++11 scoped enumeration support to match the final proposal:
- reject definitions of enums within friend declarations
 - require 'enum', not 'enum class', for non-declaring references to scoped
   enumerations


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147824 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-10 01:33:14 +00:00
Eric Christopher 8f0a403945 Add -g to the cc1as flags only if we're dealing with an original
source file. Otherwise -g -save-temps will error out on the compile
of any .c file.

Fixes about 4000 of the errors in the clang-tests gdb test suite.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147819 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-10 00:38:01 +00:00
Eric Christopher 46d2a5c7f9 Remove extraneous braces.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147818 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-10 00:37:56 +00:00
Fariborz Jahanian 20abee6b95 objc++: patch for IRgen for atomic properties of
c++ objects with non-trivial assignment/copy functions.
Also, one additional sema check. // rdar://6137845


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147817 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-10 00:37:01 +00:00
Eli Friedman d18840d1e2 Don't crash with -Wlarge-by-value-copy and a dependent type. PR11726.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147812 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-09 23:46:59 +00:00