]> granicus.if.org Git - clang/log
clang
14 years agoAdd code generation test for r86500.
Eli Friedman [Mon, 9 Nov 2009 18:49:09 +0000 (18:49 +0000)]
Add code generation test for r86500.

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

14 years agoTest case for Sean Hunt's patch which I left out.
Fariborz Jahanian [Mon, 9 Nov 2009 18:48:53 +0000 (18:48 +0000)]
Test case for Sean Hunt's patch which I left out.

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

14 years agoAdd support for cdecl attribute. (As far as I know, it doesn't affect CodeGen
Eli Friedman [Mon, 9 Nov 2009 18:38:53 +0000 (18:38 +0000)]
Add support for cdecl attribute.  (As far as I know, it doesn't affect CodeGen
unless we start implementing command-line switches which override the default
calling convention, so the effect is mostly to silence unknown attribute
warnings.)

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

14 years agoSlightly more testing for instantiation of non-type template parameters in nested...
Douglas Gregor [Mon, 9 Nov 2009 18:29:00 +0000 (18:29 +0000)]
Slightly more testing for instantiation of non-type template parameters in nested templates, for my own sanity's sake

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

14 years agoWriting to a struct passed by value is pointless. Remove dead code.
Benjamin Kramer [Mon, 9 Nov 2009 18:24:53 +0000 (18:24 +0000)]
Writing to a struct passed by value is pointless. Remove dead code.

- free(NULL) is a nop anyway.
- if someone thinks calling clang_disposeString twice should be legal
  please change the method to take a pointer.

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

14 years agoImprove c-index-test's parsing of the -code-completion-at=file:line:column argument
Douglas Gregor [Mon, 9 Nov 2009 18:19:57 +0000 (18:19 +0000)]
Improve c-index-test's parsing of the -code-completion-at=file:line:column argument

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

14 years agoAdd a triple to try to fix the buildbot error.
Anders Carlsson [Mon, 9 Nov 2009 17:54:53 +0000 (17:54 +0000)]
Add a triple to try to fix the buildbot error.

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

14 years agoIntroduce CXString type and associated functions clang_getCString() and clang_dispose...
Steve Naroff [Mon, 9 Nov 2009 17:45:52 +0000 (17:45 +0000)]
Introduce CXString type and associated functions clang_getCString() and clang_disposeString().

This abstraction will help us manage string memory for complex names that cross the C++/C boundary (e.g. ObjC methods, selectors). This patch also uses it in clang_getTranslationUnitSpelling (which I'm not sure is necessary). Will investigate later...since the extra malloc() can't hurt (for now).

Patch by John Thompson.

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

14 years ago__uint128_t is indeed an unsigned integer type. Fixes PR5435.
Anders Carlsson [Mon, 9 Nov 2009 17:34:18 +0000 (17:34 +0000)]
__uint128_t is indeed an unsigned integer type. Fixes PR5435.

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

14 years agoWhen transforming an InitListExpr, if we already computed a non-dependent type for...
Douglas Gregor [Mon, 9 Nov 2009 17:16:50 +0000 (17:16 +0000)]
When transforming an InitListExpr, if we already computed a non-dependent type for the InitListExpr, keep it

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

14 years agoC doesn't allow mixing declarations and statements, silly
Douglas Gregor [Mon, 9 Nov 2009 17:05:28 +0000 (17:05 +0000)]
C doesn't allow mixing declarations and statements, silly

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

14 years agoSimplify test to deal with type-based ordering variations
Douglas Gregor [Mon, 9 Nov 2009 16:22:45 +0000 (16:22 +0000)]
Simplify test to deal with type-based ordering variations

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

14 years agoVerify that code-completion is at least a little bit robust against inclusion of...
Douglas Gregor [Mon, 9 Nov 2009 16:06:30 +0000 (16:06 +0000)]
Verify that code-completion is at least a little bit robust against inclusion of missing headers

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

14 years agoMinor cleanup for CIndex-based code-completion:
Douglas Gregor [Mon, 9 Nov 2009 16:04:45 +0000 (16:04 +0000)]
Minor cleanup for CIndex-based code-completion:
  - Provide an actual test for code-completion via CIndex.
  - Actually print optional strings in c-index-test
  - Export clang_getCompletionChunkCompletionString from CIndex

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

14 years agoFix a broken link
Douglas Gregor [Mon, 9 Nov 2009 15:15:41 +0000 (15:15 +0000)]
Fix a broken link

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

14 years agoupdate test case.
Zhongxing Xu [Mon, 9 Nov 2009 13:56:44 +0000 (13:56 +0000)]
update test case.

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

14 years agoAdd check for pointer arithmetic on non-array variables.
Zhongxing Xu [Mon, 9 Nov 2009 13:23:31 +0000 (13:23 +0000)]
Add check for pointer arithmetic on non-array variables.

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

14 years agoAdd check for obsolete function call of getpw().
Zhongxing Xu [Mon, 9 Nov 2009 12:19:26 +0000 (12:19 +0000)]
Add check for obsolete function call of getpw().

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

14 years agoremove redundant file name in CMakeLists.txt.
Zhongxing Xu [Mon, 9 Nov 2009 09:35:41 +0000 (09:35 +0000)]
remove redundant file name in CMakeLists.txt.

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

14 years agoupdate CMakeList.txt
Zhongxing Xu [Mon, 9 Nov 2009 09:32:38 +0000 (09:32 +0000)]
update CMakeList.txt

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

14 years agoUpdate CMake
Daniel Dunbar [Mon, 9 Nov 2009 08:13:45 +0000 (08:13 +0000)]
Update CMake

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

14 years agoAdd comments.
Zhongxing Xu [Mon, 9 Nov 2009 08:13:04 +0000 (08:13 +0000)]
Add comments.

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

14 years agoAdd checker for CWE-588: Attempt to Access Child of a Non-structure Pointer.
Zhongxing Xu [Mon, 9 Nov 2009 08:07:38 +0000 (08:07 +0000)]
Add checker for CWE-588: Attempt to Access Child of a Non-structure Pointer.

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

14 years agoUpdate CMake
Daniel Dunbar [Mon, 9 Nov 2009 08:04:31 +0000 (08:04 +0000)]
Update CMake

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

14 years agoPut all long strings in 80-col.
Zhongxing Xu [Mon, 9 Nov 2009 07:29:39 +0000 (07:29 +0000)]
Put all long strings in 80-col.

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

14 years agoAdd checker for CWE-587: Assignment of a Fixed Address to a Pointer.
Zhongxing Xu [Mon, 9 Nov 2009 06:52:44 +0000 (06:52 +0000)]
Add checker for CWE-587: Assignment of a Fixed Address to a Pointer.

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

14 years agoAdd checker for CWE-469: Use of Pointer Subtraction to Determine Size. This
Zhongxing Xu [Mon, 9 Nov 2009 05:34:10 +0000 (05:34 +0000)]
Add checker for CWE-469: Use of Pointer Subtraction to Determine Size. This
checker does not build sink nodes. Because svaluator computes an unknown value
for the subtraction now.

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

14 years agoRearrange function to avoid recursive use-after-free.
Eli Friedman [Mon, 9 Nov 2009 05:07:37 +0000 (05:07 +0000)]
Rearrange function to avoid recursive use-after-free.

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

14 years agoExplicitly note that pre-inc/dec lvalues are not supported yet, so that it
Eli Friedman [Mon, 9 Nov 2009 04:20:47 +0000 (04:20 +0000)]
Explicitly note that pre-inc/dec lvalues are not supported yet, so that it
doesn't crash.  (Such expressions are valid in C++, but not in C.)

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

14 years agoRemove dead code.
Zhongxing Xu [Mon, 9 Nov 2009 04:19:30 +0000 (04:19 +0000)]
Remove dead code.

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

14 years agofix thinko
Chris Lattner [Mon, 9 Nov 2009 04:04:07 +0000 (04:04 +0000)]
fix thinko

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

14 years agoAdd hack to make the given testcase work. As far as I can tell, this change is
Eli Friedman [Mon, 9 Nov 2009 03:59:26 +0000 (03:59 +0000)]
Add hack to make the given testcase work.  As far as I can tell, this change is
reasonably safe, but it doesn't seem like the right solution.

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

14 years agomention that clang defaults to C99 mode, PR5388
Chris Lattner [Mon, 9 Nov 2009 03:21:02 +0000 (03:21 +0000)]
mention that clang defaults to C99 mode, PR5388

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

14 years agoremove a mostly obsolete "word of warning"
Chris Lattner [Mon, 9 Nov 2009 03:18:18 +0000 (03:18 +0000)]
remove a mostly obsolete "word of warning"

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

14 years agoAdd a test case for CWE-467, and simplify the wording of the warning.
Zhongxing Xu [Mon, 9 Nov 2009 02:28:12 +0000 (02:28 +0000)]
Add a test case for CWE-467, and simplify the wording of the warning.

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

14 years agoRename areAllFields32Or64BitBasicType to canExpandIndirectArgument to closer match...
Daniel Dunbar [Mon, 9 Nov 2009 01:33:53 +0000 (01:33 +0000)]
Rename areAllFields32Or64BitBasicType to canExpandIndirectArgument to closer match what it is semantically used for.

Also, fix a major bug where fields from a C++ struct might be dropped -- the expand action doesn't handle them correctly yet.

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

14 years agoRemove a useless variable that got left behind.
Eli Friedman [Mon, 9 Nov 2009 01:11:03 +0000 (01:11 +0000)]
Remove a useless variable that got left behind.

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

14 years agoUnify the codepaths used to verify base and member initializers for explicitly
Eli Friedman [Mon, 9 Nov 2009 01:05:47 +0000 (01:05 +0000)]
Unify the codepaths used to verify base and member initializers for explicitly
and implicitly defined constructors.  This has a number of benefits:

1. Less code.

2. Explicit and implicit constructors get the same diagnostics.

3. The AST explicitly contains constructor calls from implicit default
constructors.  This allows handing some cases that previously weren't handled
correctly in IRGen without any additional code. Specifically, implicit default
constructors containing calls to constructors with default arguments are now
handled correctly.

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

14 years agoFix use-after-free bug.
Eli Friedman [Sun, 8 Nov 2009 22:15:39 +0000 (22:15 +0000)]
Fix use-after-free bug.

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

14 years agoUpdate CMake file.
Benjamin Kramer [Sun, 8 Nov 2009 18:30:42 +0000 (18:30 +0000)]
Update CMake file.

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

14 years agoSpecial-case default argument expression in instantiation. This should fix PR4301...
Sebastian Redl [Sun, 8 Nov 2009 13:56:19 +0000 (13:56 +0000)]
Special-case default argument expression in instantiation. This should fix PR4301. Doug, please double-check my assumptions. Read the PR for more details.

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

14 years agoAdd a checker for CWE-467: Use of sizeof() on a Pointer Type.
Zhongxing Xu [Sun, 8 Nov 2009 13:10:34 +0000 (13:10 +0000)]
Add a checker for CWE-467: Use of sizeof() on a Pointer Type.

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

14 years agoWhen checking the namespace of a redeclaration or definition, look through linkage...
Sebastian Redl [Sun, 8 Nov 2009 11:36:54 +0000 (11:36 +0000)]
When checking the namespace of a redeclaration or definition, look through linkage specs. Fixes PR5430.

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

14 years agoDon't reprocess non-dependent initializers of non-dependent VarDecls. Fixes PR5426.
Sebastian Redl [Sun, 8 Nov 2009 10:16:43 +0000 (10:16 +0000)]
Don't reprocess non-dependent initializers of non-dependent VarDecls. Fixes PR5426.

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

14 years agoFix for FreeBSD toolchain in regards to CPP, Credit to Roman Divacky.
Edward O'Callaghan [Sun, 8 Nov 2009 10:13:36 +0000 (10:13 +0000)]
Fix for FreeBSD toolchain in regards to CPP, Credit to Roman Divacky.

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

14 years agoAdd clarifying parens.
Daniel Dunbar [Sun, 8 Nov 2009 09:46:46 +0000 (09:46 +0000)]
Add clarifying parens.

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

14 years agoSimplify.
Daniel Dunbar [Sun, 8 Nov 2009 09:46:39 +0000 (09:46 +0000)]
Simplify.

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

14 years agoRevert unintentional change to this file.
Daniel Dunbar [Sun, 8 Nov 2009 09:46:33 +0000 (09:46 +0000)]
Revert unintentional change to this file.

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

14 years agoTest commit - minor terminology change to my recent patch suggested by John McCall
Sean Hunt [Sun, 8 Nov 2009 07:46:34 +0000 (07:46 +0000)]
Test commit - minor terminology change to my recent patch suggested by John McCall

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

14 years agoAlways make sure we're using an unqualified type when building a
Douglas Gregor [Sun, 8 Nov 2009 07:12:55 +0000 (07:12 +0000)]
Always make sure we're using an unqualified type when building a
constructor name.  Fixes PR5418.

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

14 years agoMove a function which returns a class outside of extern C scope.
Daniel Dunbar [Sun, 8 Nov 2009 04:13:53 +0000 (04:13 +0000)]
Move a function which returns a class outside of extern C scope.

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

14 years agoCIndex: Add temporary hack to leak memory instead of returning invalid pointers.
Daniel Dunbar [Sun, 8 Nov 2009 04:11:32 +0000 (04:11 +0000)]
CIndex: Add temporary hack to leak memory instead of returning invalid pointers.

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

14 years agoDrop require_and_and argument.
Daniel Dunbar [Sun, 8 Nov 2009 01:47:35 +0000 (01:47 +0000)]
Drop require_and_and argument.

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

14 years agoRemove RUN: true lines.
Daniel Dunbar [Sun, 8 Nov 2009 01:47:25 +0000 (01:47 +0000)]
Remove RUN: true lines.

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

14 years agoMove test/Index input files into a sub directory (not scanned as tests).
Daniel Dunbar [Sun, 8 Nov 2009 01:46:19 +0000 (01:46 +0000)]
Move test/Index input files into a sub directory (not scanned as tests).

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

14 years agoEliminate &&s in tests.
Daniel Dunbar [Sun, 8 Nov 2009 01:45:36 +0000 (01:45 +0000)]
Eliminate &&s in tests.
 - 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious.

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

14 years agoRework site config for cmake to be generated at configure time, and only pass
Daniel Dunbar [Sat, 7 Nov 2009 23:53:32 +0000 (23:53 +0000)]
Rework site config for cmake to be generated at configure time, and only pass
the 'build_config' value in at runtime using the new lit runtime user parameter
feature.

This simplifies things and drops a dependency on 'sed', FWIW.

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

14 years agoTweak a FIXME.
Daniel Dunbar [Sat, 7 Nov 2009 23:53:17 +0000 (23:53 +0000)]
Tweak a FIXME.

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

14 years agoHandle member expressions where the member declaration is actually a static variable...
Anders Carlsson [Sat, 7 Nov 2009 23:16:50 +0000 (23:16 +0000)]
Handle member expressions where the member declaration is actually a static variable. Fixes PR5392.

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

14 years agoMore LValue related code cleanup.
Anders Carlsson [Sat, 7 Nov 2009 23:06:58 +0000 (23:06 +0000)]
More LValue related code cleanup.

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

14 years agoMore cleanup, the code is much easier to follow now.
Anders Carlsson [Sat, 7 Nov 2009 22:53:10 +0000 (22:53 +0000)]
More cleanup, the code is much easier to follow now.

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

14 years agoReduce nesting, no functionality change.
Anders Carlsson [Sat, 7 Nov 2009 22:46:42 +0000 (22:46 +0000)]
Reduce nesting, no functionality change.

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

14 years agoWe only need to call SetObjCNonGC for local variables. No functionality change.
Anders Carlsson [Sat, 7 Nov 2009 22:43:34 +0000 (22:43 +0000)]
We only need to call SetObjCNonGC for local variables. No functionality change.

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

14 years agoChange EmitPointerToDataMemberLValue to take a FieldDecl. No intended functionality...
Anders Carlsson [Sat, 7 Nov 2009 22:00:15 +0000 (22:00 +0000)]
Change EmitPointerToDataMemberLValue to take a FieldDecl. No intended functionality change.

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

14 years agoPatch to gives an error that at least points users in the direction of the error...
Fariborz Jahanian [Sat, 7 Nov 2009 20:20:40 +0000 (20:20 +0000)]
Patch to gives an error that at least points users in the direction of the error, rather
than an error about incompatible types. Patch by Sean Hunt.

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

14 years agocommit test update
Chris Lattner [Sat, 7 Nov 2009 18:59:51 +0000 (18:59 +0000)]
commit test update

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

14 years agoteach the various targets what native integer types they have.
Chris Lattner [Sat, 7 Nov 2009 18:59:41 +0000 (18:59 +0000)]
teach the various targets what native integer types they have.

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

14 years agoFix some build warnings.
Daniel Dunbar [Sat, 7 Nov 2009 18:34:24 +0000 (18:34 +0000)]
Fix some build warnings.

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

14 years agoAdd some missing libraries for CMake as well.
Daniel Dunbar [Sat, 7 Nov 2009 17:53:40 +0000 (17:53 +0000)]
Add some missing libraries for CMake as well.

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

14 years agoAdd some missing libraries.
Daniel Dunbar [Sat, 7 Nov 2009 17:52:11 +0000 (17:52 +0000)]
Add some missing libraries.

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

14 years agoCope with calls to operator() templates. Fixes PR5419.
Douglas Gregor [Sat, 7 Nov 2009 17:23:56 +0000 (17:23 +0000)]
Cope with calls to operator() templates. Fixes PR5419.

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

14 years agoadd missing #include
Chris Lattner [Sat, 7 Nov 2009 09:22:46 +0000 (09:22 +0000)]
add missing #include

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

14 years agoSupport -Wshorten-64-to-32 for integer types only, which seems to satisfy the
John McCall [Sat, 7 Nov 2009 09:03:53 +0000 (09:03 +0000)]
Support -Wshorten-64-to-32 for integer types only, which seems to satisfy the
core requirements.  Fixes rdar://problem/6389954

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

14 years agoAdd bug number.
Anders Carlsson [Sat, 7 Nov 2009 08:24:59 +0000 (08:24 +0000)]
Add bug number.

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

14 years agoImprove -Wconversion by permitting binary operations on values of the target
John McCall [Sat, 7 Nov 2009 08:15:46 +0000 (08:15 +0000)]
Improve -Wconversion by permitting binary operations on values of the target
type (or smaller) to stay "closed" within the type.

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

14 years agoDon't treat variables with non-trivial ctors or dtors as unused. Fixes PR5407.
Anders Carlsson [Sat, 7 Nov 2009 07:26:56 +0000 (07:26 +0000)]
Don't treat variables with non-trivial ctors or dtors as unused. Fixes PR5407.

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

14 years agoCleanup, no functionality change.
Anders Carlsson [Sat, 7 Nov 2009 07:18:14 +0000 (07:18 +0000)]
Cleanup, no functionality change.

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

14 years agoAlways mangle functions with special names. Fixes PR5420.
Anders Carlsson [Sat, 7 Nov 2009 07:15:03 +0000 (07:15 +0000)]
Always mangle functions with special names. Fixes PR5420.

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

14 years agoWhen instantiating a field decl, make sure to clone its attributes. With this change...
Anders Carlsson [Sat, 7 Nov 2009 06:07:58 +0000 (06:07 +0000)]
When instantiating a field decl, make sure to clone its attributes. With this change FileCheck no longer crashes when it's run without any arguments.

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

14 years agoUse SaveAndRestore to simplify logic in LiveVariables::runOnAllBlocks(). Patch by...
Ted Kremenek [Sat, 7 Nov 2009 05:57:35 +0000 (05:57 +0000)]
Use SaveAndRestore to simplify logic in LiveVariables::runOnAllBlocks().  Patch by Kovarththanan Rajaratnam!

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

14 years agoSwitch clang-cc to use ApplyHeaderSearchOptions, and fix a thinko.
Daniel Dunbar [Sat, 7 Nov 2009 04:58:12 +0000 (04:58 +0000)]
Switch clang-cc to use ApplyHeaderSearchOptions, and fix a thinko.

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

14 years agoWhen looking up and adding substitutions to the substitution table, make sure to...
Anders Carlsson [Sat, 7 Nov 2009 04:26:04 +0000 (04:26 +0000)]
When looking up and adding substitutions to the substitution table, make sure to always use the canonical declaration. With tihs change, FileCheck compiles and links but crashes during startup.

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

14 years agoAdd HeaderSearchOptions class, for packaging the information needed to
Daniel Dunbar [Sat, 7 Nov 2009 04:20:50 +0000 (04:20 +0000)]
Add HeaderSearchOptions class, for packaging the information needed to
initialize HeaderSearch. Not used yet.

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

14 years agoLift InitHeaderSearch::AddEnvVarPaths logic higher.
Daniel Dunbar [Sat, 7 Nov 2009 04:20:39 +0000 (04:20 +0000)]
Lift InitHeaderSearch::AddEnvVarPaths logic higher.

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

14 years agoFormatting fixes.
Daniel Dunbar [Sat, 7 Nov 2009 04:20:25 +0000 (04:20 +0000)]
Formatting fixes.

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

14 years agoRename PreprocessorInitOptions to PreprocessorOptions for consistency, and fix
Daniel Dunbar [Sat, 7 Nov 2009 04:20:15 +0000 (04:20 +0000)]
Rename PreprocessorInitOptions to PreprocessorOptions for consistency, and fix
filenames.

Also, move InitializePreprocessor to Utils.h.

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

14 years agoLift compiler builtin include path logic higher.
Daniel Dunbar [Sat, 7 Nov 2009 04:19:57 +0000 (04:19 +0000)]
Lift compiler builtin include path logic higher.

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

14 years agoRemove Checker::CheckType() (and instead using CheckerVisitor::PreVisitDeclStmt(...
Ted Kremenek [Sat, 7 Nov 2009 03:56:57 +0000 (03:56 +0000)]
Remove Checker::CheckType() (and instead using CheckerVisitor::PreVisitDeclStmt()), and refactor VLASizeChecker to have only one Checker subclass (not two) and to not use the node builders directly (and instead use the newer CheckerContext).

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

14 years agoTest case for -Wconversion.
John McCall [Sat, 7 Nov 2009 03:30:38 +0000 (03:30 +0000)]
Test case for -Wconversion.

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

14 years agoImplement -Wconversion. Off by default, in the non-gcc group. There's
John McCall [Sat, 7 Nov 2009 03:30:10 +0000 (03:30 +0000)]
Implement -Wconversion.  Off by default, in the non-gcc group.  There's
significant work left to be done to reduce the false-positive rate here.

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

14 years agoAdd basic code completion support for ObjC messages.
Steve Naroff [Sat, 7 Nov 2009 02:08:14 +0000 (02:08 +0000)]
Add basic code completion support for ObjC messages.

Still a work in progress...

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

14 years agoRevert r86315 and add Type::FixedWidthInt to the FIXME cases.
Anders Carlsson [Sat, 7 Nov 2009 01:19:37 +0000 (01:19 +0000)]
Revert r86315 and add Type::FixedWidthInt to the FIXME cases.

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

14 years agoMIPS linkage name confuses gdb here. Generate and test DW_AT_name here.
Devang Patel [Sat, 7 Nov 2009 00:41:37 +0000 (00:41 +0000)]
MIPS linkage name confuses gdb here. Generate and test DW_AT_name here.

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

14 years agoDo not assert if debug info for certain type is not generated.
Devang Patel [Sat, 7 Nov 2009 00:29:05 +0000 (00:29 +0000)]
Do not assert if debug info for certain type is not generated.

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

14 years agoDo not emit linkage name for global variables. It confuses gdb, because it picks...
Devang Patel [Sat, 7 Nov 2009 00:10:18 +0000 (00:10 +0000)]
Do not emit linkage name for global variables. It confuses gdb, because it picks up AT_MIPS_linkage_name and ignores AT_name.

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

14 years agoMake sure isCopyAssignment is only true for actual copy assignment operators,
Eli Friedman [Sat, 7 Nov 2009 00:02:45 +0000 (00:02 +0000)]
Make sure isCopyAssignment is only true for actual copy assignment operators,
instead of all assignment operators.  The mistake messes up IRGen because
it ends up assuming that the assignment operator is actually the implicit
copy assignment operator, and therefore tries to emit the RHS as an lvalue.

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

14 years agoVarious improvements to Clang's code-completion infrastructure:
Douglas Gregor [Sat, 7 Nov 2009 00:00:49 +0000 (00:00 +0000)]
Various improvements to Clang's code-completion infrastructure:
  - Introduce more code-completion string "chunk" kinds that describe
  symbols, the actual text that the user is expected to type, etc.
  - Make the generation of macro results optional, since it can be
  slow
  - Make code-completion accessible through the C API, marshalling the
  code-completion results through a temporary file (ick) to maintain
  process separation.

The last doesn't have tests yet.

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

14 years agoRefine the non-virtual this adjustment. Optimize out virtual this
Mike Stump [Fri, 6 Nov 2009 23:27:42 +0000 (23:27 +0000)]
Refine the non-virtual this adjustment.  Optimize out virtual this
adjustments of zero.

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

14 years agoSince default writable attribute is 'assign', allow
Fariborz Jahanian [Fri, 6 Nov 2009 22:59:12 +0000 (22:59 +0000)]
Since default writable attribute is 'assign', allow
specification of 'assign' (no warning to be issued),
when a continuation class makes a 'readonly' attribute
'readwrite' but also specifies the 'assign' attribute.
(this matches gcc's behavior and prevents exessive
 warnings)/

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

14 years agoMake fragile-abi test run happy.
Fariborz Jahanian [Fri, 6 Nov 2009 22:15:27 +0000 (22:15 +0000)]
Make fragile-abi test run happy.

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