]> granicus.if.org Git - clang/log
clang
14 years agoUpdate tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
Daniel Dunbar [Tue, 15 Dec 2009 20:14:24 +0000 (20:14 +0000)]
Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
 - This is designed to make it obvious that %clang_cc1 is a "test variable"
   which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
   can be useful to redefine what gets run as 'clang -cc1' (for example, to set
   a default target).

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

14 years agoIf a ParmVarDecl's default argument is a CXXExprWithTemporaries, return the underlyin...
Anders Carlsson [Tue, 15 Dec 2009 19:16:31 +0000 (19:16 +0000)]
If a ParmVarDecl's default argument is a CXXExprWithTemporaries, return the underlying expr instead. Add getNumDefaultArgTemporaries and getDefaultArgTemporary which returns the temporaries a default arg creates.

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

14 years agoSupport OpenCL 1.1 odd-length vector component accessors.
Nate Begeman [Tue, 15 Dec 2009 18:13:04 +0000 (18:13 +0000)]
Support OpenCL 1.1 odd-length vector component accessors.

For hi/odd of an odd-length vector, the last component is undefined.  Since
we shuffle with an undef vector, no CodeGen needs to change to support this.

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

14 years agoAdd testcase for recent checkin.
Mike Stump [Tue, 15 Dec 2009 18:02:45 +0000 (18:02 +0000)]
Add testcase for recent checkin.

Patch by Chip Davis.

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

14 years agoImplement conditional block invocation rewrite
Fariborz Jahanian [Tue, 15 Dec 2009 17:30:20 +0000 (17:30 +0000)]
Implement conditional block invocation rewrite
and some clean up and a block rewriter test.

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

14 years agoFix some diagnostic-related FIXMEs, from Nicola Gigante
Douglas Gregor [Tue, 15 Dec 2009 16:44:32 +0000 (16:44 +0000)]
Fix some diagnostic-related FIXMEs, from Nicola Gigante

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

14 years agoElaborated types are specifier types, based on a patch from Cornelius
Douglas Gregor [Tue, 15 Dec 2009 16:28:32 +0000 (16:28 +0000)]
Elaborated types are specifier types, based on a patch from Cornelius

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

14 years agoAdd comments.
Zhongxing Xu [Tue, 15 Dec 2009 09:32:42 +0000 (09:32 +0000)]
Add comments.

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

14 years agoRemove displayProgress parameter.
Zhongxing Xu [Tue, 15 Dec 2009 09:09:49 +0000 (09:09 +0000)]
Remove displayProgress parameter.

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

14 years agomove isPodLike<clang::QualType> out to Type.h. We don't
Chris Lattner [Tue, 15 Dec 2009 07:30:12 +0000 (07:30 +0000)]
move isPodLike<clang::QualType> out to Type.h.  We don't
want some clients of QualType to think it's a pod and some to
not know it is.

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

14 years agoupdate to match LLVM API change:
Chris Lattner [Tue, 15 Dec 2009 07:26:51 +0000 (07:26 +0000)]
update to match LLVM API change:

Remove isPod() from DenseMapInfo, splitting it out to its own
isPodLike type trait.  This is a generally useful type trait for
more than just DenseMap, and we really care about whether something
acts like a pod, not whether it really is a pod.

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

14 years agoAdd -W[no-]variadic-macros support.
Daniel Dunbar [Tue, 15 Dec 2009 05:29:09 +0000 (05:29 +0000)]
Add -W[no-]variadic-macros support.

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

14 years agoForward -isysroot to clang -cc1.
Daniel Dunbar [Tue, 15 Dec 2009 04:55:58 +0000 (04:55 +0000)]
Forward -isysroot to clang -cc1.

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

14 years agoFix a COVTCTII (crash-on-valid-that-clang-thinks-is-invalid, duh),
Daniel Dunbar [Tue, 15 Dec 2009 04:24:24 +0000 (04:24 +0000)]
Fix a COVTCTII (crash-on-valid-that-clang-thinks-is-invalid, duh),
note_previous_decl was used where note_previous_declaration was intended. Better
names or PR5785 might be nice.

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

14 years agoUntil we can make the dead stores checker smarter, dont' emit dead store warnings...
Ted Kremenek [Tue, 15 Dec 2009 04:12:12 +0000 (04:12 +0000)]
Until we can make the dead stores checker smarter, dont' emit dead store warnings for C++ objects (whose constructors/destructors have possible side-effects).

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

14 years agoFix a small bug in ComputeMethodVtableIndices.
Eli Friedman [Tue, 15 Dec 2009 03:31:17 +0000 (03:31 +0000)]
Fix a small bug in ComputeMethodVtableIndices.

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

14 years agoReally fix this test.
Eli Friedman [Tue, 15 Dec 2009 03:22:41 +0000 (03:22 +0000)]
Really fix this test.

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

14 years agoThis patch should fix PR2461. It allows clang to apply the noreturn
Mike Stump [Tue, 15 Dec 2009 03:11:10 +0000 (03:11 +0000)]
This patch should fix PR2461. It allows clang to apply the noreturn
attribute to function pointers. It also fixes Sema to check function
pointers for the noreturn attribute when checking for fallthrough.

Patch by Chip Davis, with a slight fix to pass the testsuite.

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

14 years agoscan-build/ccc-analyzer: start analyzing C++ FTW.
Ted Kremenek [Tue, 15 Dec 2009 02:35:54 +0000 (02:35 +0000)]
scan-build/ccc-analyzer: start analyzing C++ FTW.

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

14 years agoFix test broken by my last commit.
Eli Friedman [Tue, 15 Dec 2009 02:20:06 +0000 (02:20 +0000)]
Fix test broken by my last commit.

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

14 years agoDiagnose the use of typedefs for template specialization types in the scope
John McCall [Tue, 15 Dec 2009 02:19:47 +0000 (02:19 +0000)]
Diagnose the use of typedefs for template specialization types in the scope
specifiers for out-of-line declarations, e.g.
  typedef Temp<int> MyTemp;
  template <> MyTemp::foo;

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

14 years agoDon't force the emission of destructor definitions.
Eli Friedman [Tue, 15 Dec 2009 02:06:15 +0000 (02:06 +0000)]
Don't force the emission of destructor definitions.

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

14 years agoset up the machinery for a MacroArgs cache hanging off Preprocessor.
Chris Lattner [Tue, 15 Dec 2009 01:51:03 +0000 (01:51 +0000)]
set up the machinery for a MacroArgs cache hanging off Preprocessor.
We creating and free thousands of MacroArgs objects (and the related
std::vectors hanging off them) for the testcase in PR5610 even though
there are only ~20 live at a time.  This doesn't actually use the
cache yet.

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

14 years agoStart the ball rolling on C++ support in the static analyzer. For
Ted Kremenek [Tue, 15 Dec 2009 01:38:04 +0000 (01:38 +0000)]
Start the ball rolling on C++ support in the static analyzer.  For
now, don't construct CFGs that contain C++ try/catch statements, and
have GRExprEngine abort a path if it encounters a C++ construct it
doesn't understand (which is mostly everything at this point).

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

14 years agoFix spacing.
Mike Stump [Tue, 15 Dec 2009 01:22:35 +0000 (01:22 +0000)]
Fix spacing.

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

14 years agoDriver: Pass -resource-dir to clang -cc1, since the driver presumably already found...
Daniel Dunbar [Tue, 15 Dec 2009 01:02:52 +0000 (01:02 +0000)]
Driver: Pass -resource-dir to clang -cc1, since the driver presumably already found itself.

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

14 years agoEnsure we preserve line information for each trap for
Mike Stump [Tue, 15 Dec 2009 00:59:40 +0000 (00:59 +0000)]
Ensure we preserve line information for each  trap for
-fcatch-undefined-behavior if we aren't optimizing.  WIP.

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

14 years agoSwitch codegen for -fcatch-undefined-bahavior over to __builtin_trap
Mike Stump [Tue, 15 Dec 2009 00:35:12 +0000 (00:35 +0000)]
Switch codegen for -fcatch-undefined-bahavior over to __builtin_trap
instead of abort to improve codesize and codegen.

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

14 years agoUpdate checker build.
Ted Kremenek [Tue, 15 Dec 2009 00:32:46 +0000 (00:32 +0000)]
Update checker build.

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

14 years agoAdd -resource-dir to clang -cc1, this allows the base directory for compiler
Daniel Dunbar [Tue, 15 Dec 2009 00:06:45 +0000 (00:06 +0000)]
Add -resource-dir to clang -cc1, this allows the base directory for compiler
resources (e.g., /usr/lib/clang/1.1) to be passed on the command line instead of
computed.

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

14 years agoImplement value initialization in InitializationSequence; untested
Douglas Gregor [Tue, 15 Dec 2009 00:01:57 +0000 (00:01 +0000)]
Implement value initialization in InitializationSequence; untested
WIP, yet again.

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

14 years agoAdd documentation for recently added code. WIP.
Mike Stump [Mon, 14 Dec 2009 23:53:10 +0000 (23:53 +0000)]
Add documentation for recently added code.  WIP.

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

14 years agoFix PR5716 by bandaging over the solution until we can come back to it.
John McCall [Mon, 14 Dec 2009 23:19:40 +0000 (23:19 +0000)]
Fix PR5716 by bandaging over the solution until we can come back to it.
I apologize for friend declarations.

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

14 years agoMake test more generic.
Fariborz Jahanian [Mon, 14 Dec 2009 22:17:35 +0000 (22:17 +0000)]
Make test more generic.

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

14 years agoFix: <rdar://problem/7468209> SymbolManager::isLive() should not crash on captured...
Ted Kremenek [Mon, 14 Dec 2009 22:15:06 +0000 (22:15 +0000)]
Fix: <rdar://problem/7468209> SymbolManager::isLive() should not crash on captured block variables that are passed by reference

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

14 years agoWe have to allow one to form an address for one past the end. WIP.
Mike Stump [Mon, 14 Dec 2009 22:14:31 +0000 (22:14 +0000)]
We have to allow one to form an address for one past the end.  WIP.

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

14 years agomove the VarargsElided member of MacrosArgs to shrink the MacroArgs struct
Chris Lattner [Mon, 14 Dec 2009 22:12:52 +0000 (22:12 +0000)]
move the VarargsElided member of MacrosArgs to shrink the MacroArgs struct
on 64-bit targets.  Pass Preprocessor into create/destroy methods of MacroArgs
even though it isn't used yet.

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

14 years agofix typo
Chris Lattner [Mon, 14 Dec 2009 22:02:43 +0000 (22:02 +0000)]
fix typo

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

14 years agoAdd support for detecting undefined shift behavior. WIP.
Mike Stump [Mon, 14 Dec 2009 21:58:14 +0000 (21:58 +0000)]
Add support for detecting undefined shift behavior.  WIP.

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

14 years agoPatch to fix 32-bit @try failure with internal assertion when compiling
Fariborz Jahanian [Mon, 14 Dec 2009 21:35:01 +0000 (21:35 +0000)]
Patch to fix 32-bit @try failure with internal assertion when compiling
an Objective-C rethrow nested inside another try/catch block. (fixes radar 7466728).

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

14 years agoRemove accidental commit containing local paths for the LLVM-Code-Syntax test
Douglas Gregor [Mon, 14 Dec 2009 20:58:24 +0000 (20:58 +0000)]
Remove accidental commit containing local paths for the LLVM-Code-Syntax test

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

14 years agoMinor cleanups for constructor initialization in InitializationSequence
Douglas Gregor [Mon, 14 Dec 2009 20:57:13 +0000 (20:57 +0000)]
Minor cleanups for constructor initialization in InitializationSequence

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

14 years agoSimplifiy.
Mike Stump [Mon, 14 Dec 2009 20:52:00 +0000 (20:52 +0000)]
Simplifiy.

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

14 years agoConstructor initialization for InitializationSequence. Untested WIP.
Douglas Gregor [Mon, 14 Dec 2009 20:49:26 +0000 (20:49 +0000)]
Constructor initialization for InitializationSequence. Untested WIP.

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

14 years agoImprove template instantiation for object constructions in several ways:
Douglas Gregor [Mon, 14 Dec 2009 19:27:10 +0000 (19:27 +0000)]
Improve template instantiation for object constructions in several ways:

  - During instantiation, drop default arguments from constructor and
    call expressions; they'll be recomputed anyway, and we don't want
    to instantiate them twice.
  - Rewrote the instantiation of variable initializers to cope with
    non-dependent forms properly.

Together, these fix a handful of problems I introduced with the switch
to always rebuild expressions from the source code "as written."

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

14 years agoMake test pass in all cases.
Fariborz Jahanian [Mon, 14 Dec 2009 18:38:32 +0000 (18:38 +0000)]
Make test pass in all cases.

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

14 years agoFixes an incomplete test case.
Fariborz Jahanian [Mon, 14 Dec 2009 18:18:29 +0000 (18:18 +0000)]
Fixes an incomplete test case.

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

14 years agoMake tests use the new clang -cc1 flag.
Fariborz Jahanian [Mon, 14 Dec 2009 18:00:56 +0000 (18:00 +0000)]
Make tests use the new clang -cc1 flag.

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

14 years agoMake tests use the new clang cc1 flag.
Fariborz Jahanian [Mon, 14 Dec 2009 17:51:07 +0000 (17:51 +0000)]
Make tests use the new clang cc1 flag.

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

14 years agoMake tests use the new clang -cc1 flag.
Fariborz Jahanian [Mon, 14 Dec 2009 17:47:10 +0000 (17:47 +0000)]
Make tests use the new clang -cc1 flag.

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

14 years agoMake tests use the new clang -cc1 flag.
Fariborz Jahanian [Mon, 14 Dec 2009 17:43:07 +0000 (17:43 +0000)]
Make tests use the new clang -cc1 flag.

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

14 years agoChange tests to use clang -cc1...
Fariborz Jahanian [Mon, 14 Dec 2009 17:36:25 +0000 (17:36 +0000)]
Change tests to use clang -cc1...

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

14 years agoImplement user-defined conversions in InitializationSequence. WPI that
Douglas Gregor [Mon, 14 Dec 2009 17:27:33 +0000 (17:27 +0000)]
Implement user-defined conversions in InitializationSequence. WPI that
isn't turned on anyway yet, so it cannot be tested.

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

14 years agoTest uses the new clang.
Fariborz Jahanian [Mon, 14 Dec 2009 17:14:55 +0000 (17:14 +0000)]
Test uses the new clang.

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

14 years agoTests use the new clang.
Fariborz Jahanian [Mon, 14 Dec 2009 17:13:18 +0000 (17:13 +0000)]
Tests use the new clang.

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

14 years agoWhen rebuilding CXXConstructExprs after a transformation, use
Douglas Gregor [Mon, 14 Dec 2009 16:27:04 +0000 (16:27 +0000)]
When rebuilding CXXConstructExprs after a transformation, use
CompleteConstructorCall to perform type-checking.

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

14 years agoReplace clang-cc with clang -cc1.
Zhongxing Xu [Mon, 14 Dec 2009 06:34:20 +0000 (06:34 +0000)]
Replace clang-cc with clang -cc1.

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

14 years agoteach clang to recover gracefully from conflict markers left in source
Chris Lattner [Mon, 14 Dec 2009 06:16:57 +0000 (06:16 +0000)]
teach clang to recover gracefully from conflict markers left in source
files: PR5238.

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

14 years agoRevert mmx palignr to use an intrinsic, since mmx shuffle patterns are missing.
Nate Begeman [Mon, 14 Dec 2009 05:15:02 +0000 (05:15 +0000)]
Revert mmx palignr to use an intrinsic, since mmx shuffle patterns are missing.

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

14 years agothis was a couple bugzillas too
Chris Lattner [Mon, 14 Dec 2009 05:03:13 +0000 (05:03 +0000)]
this was a couple bugzillas too

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

14 years agofix rdar://7466570 - Be more bug compatible with GCC when it comes to
Chris Lattner [Mon, 14 Dec 2009 05:00:18 +0000 (05:00 +0000)]
fix rdar://7466570 - Be more bug compatible with GCC when it comes to
expanding directives withing macro expansions.  This is undefined behavior
according to 6.10.3p11, so we might as well be undefined in ways similar to
GCC.

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

14 years agofilecheckize
Chris Lattner [Mon, 14 Dec 2009 04:57:53 +0000 (04:57 +0000)]
filecheckize

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

14 years agoSupport x86's PALIGNR instruction without the use of a palignr intrinsic.
Nate Begeman [Mon, 14 Dec 2009 04:57:03 +0000 (04:57 +0000)]
Support x86's PALIGNR instruction without the use of a palignr intrinsic.

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

14 years agoformatting changes.
Chris Lattner [Mon, 14 Dec 2009 04:54:40 +0000 (04:54 +0000)]
formatting changes.

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

14 years agoreduce indentation.
Chris Lattner [Mon, 14 Dec 2009 04:26:45 +0000 (04:26 +0000)]
reduce indentation.

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

14 years agoUse insert to avoid destroying existing nodes.
Zhongxing Xu [Mon, 14 Dec 2009 02:13:39 +0000 (02:13 +0000)]
Use insert to avoid destroying existing nodes.

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

14 years agoMangle unary, binary and ternary expressions correctly.
Anders Carlsson [Mon, 14 Dec 2009 01:45:37 +0000 (01:45 +0000)]
Mangle unary, binary and ternary expressions correctly.

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

14 years agoRename dump to dumpDeclContext, so that call RD->dump() won't dump the decl context...
Anders Carlsson [Mon, 14 Dec 2009 00:51:04 +0000 (00:51 +0000)]
Rename dump to dumpDeclContext, so that call RD->dump() won't dump the decl context by default.

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

14 years agoSimplify BuildSimpleType in the RTTBuilder to avoid using an std::vector.
Anders Carlsson [Sun, 13 Dec 2009 23:47:29 +0000 (23:47 +0000)]
Simplify BuildSimpleType in the RTTBuilder to avoid using an std::vector.

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

14 years agoFix PR5756 a different, better way: we don't have a "pointer
Douglas Gregor [Sun, 13 Dec 2009 21:37:05 +0000 (21:37 +0000)]
Fix PR5756 a different, better way: we don't have a "pointer
conversion to void*" according to C++ [over.ics.rank]p4b2 if the type
we're converting from is not a pointer.

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

14 years agoDon't assume that all conversions to a void pointer are converting
Douglas Gregor [Sun, 13 Dec 2009 21:29:20 +0000 (21:29 +0000)]
Don't assume that all conversions to a void pointer are converting
from a PointerType. Fixes PR5756.

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

14 years agoFix template instantiation for non-dependent calls to overloaded call
Douglas Gregor [Sun, 13 Dec 2009 20:44:55 +0000 (20:44 +0000)]
Fix template instantiation for non-dependent calls to overloaded call
operators. Fixes PR5266.

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

14 years agoDon't use a cookie if the global placement new function is used.
Anders Carlsson [Sun, 13 Dec 2009 20:34:34 +0000 (20:34 +0000)]
Don't use a cookie if the global placement new function is used.

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

14 years agoFix regression in my last commit - if a struct has a trivial destructor but no usual...
Anders Carlsson [Sun, 13 Dec 2009 20:10:12 +0000 (20:10 +0000)]
Fix regression in my last commit - if a struct has a trivial destructor but no usual deallocation function we don't need a cookie.

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

14 years agoMore array cookie improvements.
Anders Carlsson [Sun, 13 Dec 2009 20:04:38 +0000 (20:04 +0000)]
More array cookie improvements.

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

14 years agoIf the usual array deallocation function of a class takes two arguments, we need...
Anders Carlsson [Sun, 13 Dec 2009 18:48:07 +0000 (18:48 +0000)]
If the usual array deallocation function of a class takes two arguments, we need to pass the number of bytes allocated to the deallocation function, just not the number of bytes in a single element.

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

14 years agoFix test.
Anders Carlsson [Sun, 13 Dec 2009 18:30:34 +0000 (18:30 +0000)]
Fix test.

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

14 years agoMore improvements to checking allocation and deallocation functions.
Anders Carlsson [Sun, 13 Dec 2009 17:53:43 +0000 (17:53 +0000)]
More improvements to checking allocation and deallocation functions.

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

14 years agoChange the RTTIBuilder's finish member function to take a pointer to the constants...
Anders Carlsson [Sun, 13 Dec 2009 16:38:01 +0000 (16:38 +0000)]
Change the RTTIBuilder's finish member function to take a pointer to the constants array + the length of the array.

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

14 years agoLift builtin-include-path logic out of ASTUnit::LoadFromCommandLine and fix CIndex...
Daniel Dunbar [Sun, 13 Dec 2009 03:46:13 +0000 (03:46 +0000)]
Lift builtin-include-path logic out of ASTUnit::LoadFromCommandLine and fix CIndex to pass in the right directory (previously it was using the path to the main executable, which generally is wrong).

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

14 years agoCompilerInvocation: Move builtin-include-path logic out of CompilerInvocation::Create...
Daniel Dunbar [Sun, 13 Dec 2009 03:45:58 +0000 (03:45 +0000)]
CompilerInvocation: Move builtin-include-path logic out of CompilerInvocation::CreateFromArgs.

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

14 years agoUse clang -cc1 in test, to improve determinism.
Daniel Dunbar [Sun, 13 Dec 2009 02:20:49 +0000 (02:20 +0000)]
Use clang -cc1 in test, to improve determinism.

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

14 years agoTests: Fix some bugs in clang_f_opts, options were out of order but it worked
Daniel Dunbar [Sun, 13 Dec 2009 02:00:23 +0000 (02:00 +0000)]
Tests: Fix some bugs in clang_f_opts, options were out of order but it worked
because it had two inputs, except on Win32 where /dev/null doesn't exist.

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

14 years agoSilence some release build warnings.
Chandler Carruth [Sun, 13 Dec 2009 01:37:04 +0000 (01:37 +0000)]
Silence some release build warnings.

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

14 years agoBackend: Switch to using TargetOptions or TargetMachine to set some options instead...
Daniel Dunbar [Sat, 12 Dec 2009 23:01:36 +0000 (23:01 +0000)]
Backend: Switch to using TargetOptions or TargetMachine to set some options instead of llvm::cl.

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

14 years agopatch to add a property from a protocol to a class that adopts the protocol.
Fariborz Jahanian [Sat, 12 Dec 2009 21:26:21 +0000 (21:26 +0000)]
patch to add a property from a protocol to a class that adopts the protocol.
(fixes radar 7466494).

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

14 years agoUpdate checker build.
Ted Kremenek [Sat, 12 Dec 2009 19:06:20 +0000 (19:06 +0000)]
Update checker build.

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

14 years agoRework the way we handle template instantiation for
Douglas Gregor [Sat, 12 Dec 2009 18:16:41 +0000 (18:16 +0000)]
Rework the way we handle template instantiation for
implicitly-generated AST nodes. We previously built instantiated nodes
for each of these AST nodes, then passed them on to Sema, which was
not prepared to see already-type-checked nodes (see PR5755). In some
places, we had ugly workarounds to try to avoid re-type-checking
(e.g., in VarDecl initializer instantiation).

Now, we skip implicitly-generated nodes when performing instantiation,
preferring instead to build just the AST nodes that directly reflect
what was written in the source code. This has several advantages:

  - We don't need to instantiate anything that doesn't have a direct
    correlation to the source code, so we can have better location
    information.
  - Semantic analysis sees the same thing at template instantiation
    time that it would see for a non-template.
  - At least one ugly hack (VarDecl initializers) goes away.

Fixes PR5755.

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

14 years agoAdd initial support for realloc() in MallocChecker.
Zhongxing Xu [Sat, 12 Dec 2009 12:29:38 +0000 (12:29 +0000)]
Add initial support for realloc() in MallocChecker.

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

14 years agoRemember the type name's scope specifier in the DeclSpec.
John McCall [Sat, 12 Dec 2009 11:40:51 +0000 (11:40 +0000)]
Remember the type name's scope specifier in the DeclSpec.

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

14 years agoWhen certain diagnostics involving run-time behavior would be emitted
Douglas Gregor [Sat, 12 Dec 2009 07:57:52 +0000 (07:57 +0000)]
When certain diagnostics involving run-time behavior would be emitted
in a potentially potentially evaluated context, queue those
diagnostics and only emit them if the context ends up being
potentially evaluated. This completes the fix for PR5761.

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

14 years agoGive PartialDiagnostic copy semantics rather than move semantics, since we typically...
Douglas Gregor [Sat, 12 Dec 2009 07:48:51 +0000 (07:48 +0000)]
Give PartialDiagnostic copy semantics rather than move semantics, since we typically pass it by reference

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

14 years agoRemove unnecessary pointers from PartialDiagnostic
Douglas Gregor [Sat, 12 Dec 2009 07:31:50 +0000 (07:31 +0000)]
Remove unnecessary pointers from PartialDiagnostic

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

14 years agoSuppress warnings and errors about certain uses of non-POD types (in
Douglas Gregor [Sat, 12 Dec 2009 07:25:49 +0000 (07:25 +0000)]
Suppress warnings and errors about certain uses of non-POD types (in
__builtin_offsetof, passing through an ellipsis) when we're in an
unevaluated context. This is the first part of the fix to PR5761,
which deals with the simple case of an unevaluated context.

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

14 years agoUn-namespace-qualify llvm_unreachable. It's a macro, so the qualification gave
Jeffrey Yasskin [Sat, 12 Dec 2009 05:05:38 +0000 (05:05 +0000)]
Un-namespace-qualify llvm_unreachable. It's a macro, so the qualification gave
no extra safety anyway.

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

14 years agoFix for PR4642: move work in HTMLPrinter out of the destructor.
Eli Friedman [Sat, 12 Dec 2009 03:36:52 +0000 (03:36 +0000)]
Fix for PR4642: move work in HTMLPrinter out of the destructor.

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

14 years agoFix tyop.
Anders Carlsson [Sat, 12 Dec 2009 02:43:16 +0000 (02:43 +0000)]
Fix tyop.

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

14 years agoImplement runtime checks for undefined behavior. WIP.
Mike Stump [Sat, 12 Dec 2009 01:27:46 +0000 (01:27 +0000)]
Implement runtime checks for undefined behavior.  WIP.

This implements a new flag -fcatch-undefined-behavior.  The flag turns
on additional runtime checks for:

  T a[I];

  a[i]    abort when i < 0 or i >= I.

Future stuff includes shifts by >= bitwidth amounts.

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

14 years agoRemove empty directory.
Eli Friedman [Sat, 12 Dec 2009 01:05:43 +0000 (01:05 +0000)]
Remove empty directory.

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

14 years agoWe should only scan for nested blocks if we are analyzing the body of a function...
Ted Kremenek [Sat, 12 Dec 2009 01:04:14 +0000 (01:04 +0000)]
We should only scan for nested blocks if we are analyzing the body of a function/method.

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