]> granicus.if.org Git - clang/log
clang
14 years agoDriver/Darwin: Honor IPHONEOS_DEPLOYMENT_TARGET.
Daniel Dunbar [Tue, 26 Jan 2010 01:45:19 +0000 (01:45 +0000)]
Driver/Darwin: Honor IPHONEOS_DEPLOYMENT_TARGET.

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

14 years agoDriver/Darwin: Stuff iPhoneOS into environment portion of the (llvm/clang) triple...
Daniel Dunbar [Tue, 26 Jan 2010 01:44:04 +0000 (01:44 +0000)]
Driver/Darwin: Stuff iPhoneOS into environment portion of the (llvm/clang) triple instead of keying off architecture. Also, fix version define to properly include the revision/micro component of the version number.

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

14 years agoPass access specifiers around in overload resolution.
John McCall [Tue, 26 Jan 2010 01:37:31 +0000 (01:37 +0000)]
Pass access specifiers around in overload resolution.

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

14 years agoFix a regression caused by my rewriting of cast of ivar
Fariborz Jahanian [Tue, 26 Jan 2010 00:29:22 +0000 (00:29 +0000)]
Fix a regression caused by my rewriting of cast of ivar
access (was radar 7575882).

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

14 years agoFixup a missing vcall entry. WIP.
Mike Stump [Tue, 26 Jan 2010 00:05:04 +0000 (00:05 +0000)]
Fixup a missing vcall entry.  WIP.

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

14 years agoFirst cut at emitting inheritance info.
Devang Patel [Mon, 25 Jan 2010 23:32:18 +0000 (23:32 +0000)]
First cut at emitting inheritance info.

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

14 years agoEmit debug info for virtual functions.
Devang Patel [Mon, 25 Jan 2010 23:17:15 +0000 (23:17 +0000)]
Emit debug info for virtual functions.

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

14 years agoFixit to remove 'volatile' in file-scope 'asm volatile'.
John McCall [Mon, 25 Jan 2010 23:12:50 +0000 (23:12 +0000)]
Fixit to remove 'volatile' in file-scope 'asm volatile'.

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

14 years agoDriver: Fix fallback to gcc to -c instead of -S if trying to generate an LLVM bc
Daniel Dunbar [Mon, 25 Jan 2010 22:35:08 +0000 (22:35 +0000)]
Driver: Fix fallback to gcc to -c instead of -S if trying to generate an LLVM bc
file.

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

14 years agoPull functions that translate from CXSourceLocation to SourceLocation (and back)...
Ted Kremenek [Mon, 25 Jan 2010 22:34:44 +0000 (22:34 +0000)]
Pull functions that translate from CXSourceLocation to SourceLocation (and back) to a separate header file.

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

14 years agoWarn on top-level 'asm volatile' (instead of misparsing it).
John McCall [Mon, 25 Jan 2010 22:27:48 +0000 (22:27 +0000)]
Warn on top-level 'asm volatile' (instead of misparsing it).
"Fixes" rdar://problem/7574870

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

14 years agoglobal variable that binds reference to a non-lvalue reproted
Fariborz Jahanian [Mon, 25 Jan 2010 21:40:39 +0000 (21:40 +0000)]
global variable that binds reference to a non-lvalue reproted
as NYI now.

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

14 years agoFix include guard.
Ted Kremenek [Mon, 25 Jan 2010 21:09:34 +0000 (21:09 +0000)]
Fix include guard.

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

14 years agoFixes a rewriting bug of access ivar of a variable cast
Fariborz Jahanian [Mon, 25 Jan 2010 20:50:02 +0000 (20:50 +0000)]
Fixes a rewriting bug of access ivar of a variable cast
to subclass. (Fixes radar 7575882).

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

14 years agoFix a code gen. bug involving compiling global references.
Fariborz Jahanian [Mon, 25 Jan 2010 18:30:26 +0000 (18:30 +0000)]
Fix a code gen. bug involving compiling global references.
(fixes radar 7574896).

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

14 years agoAdd test case for ? : crasher
Douglas Gregor [Mon, 25 Jan 2010 17:48:13 +0000 (17:48 +0000)]
Add test case for ? : crasher

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

14 years agoMove BugReporter.h, PathDiagnostic.h, and BugType.h to 'include/Checker/BugReporter'
Ted Kremenek [Mon, 25 Jan 2010 17:10:22 +0000 (17:10 +0000)]
Move BugReporter.h, PathDiagnostic.h, and BugType.h to 'include/Checker/BugReporter'

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

14 years agoCode simplification; this should have no visible effects.
Eli Friedman [Mon, 25 Jan 2010 17:04:54 +0000 (17:04 +0000)]
Code simplification; this should have no visible effects.

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

14 years agoLoosen preconditions for clang_getCursorSpelling(), returning an empty
Douglas Gregor [Mon, 25 Jan 2010 16:56:17 +0000 (16:56 +0000)]
Loosen preconditions for clang_getCursorSpelling(), returning an empty
string when given a cursor that does not have a name. Also, don't give
silly names for statements and non-reference expressions.

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

14 years agoExpect the impossible
Douglas Gregor [Mon, 25 Jan 2010 16:45:46 +0000 (16:45 +0000)]
Expect the impossible

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

14 years agoMove the type specifier location for elaborated-type-specifiers from
Douglas Gregor [Mon, 25 Jan 2010 16:33:23 +0000 (16:33 +0000)]
Move the type specifier location for elaborated-type-specifiers from
the tag kind (union, struct, class, enum) over to the name of the tag,
if there is a name, since most clients want to point at the name.

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

14 years agoVisit the condition variables of while and for loops; also, visit the
Douglas Gregor [Mon, 25 Jan 2010 16:12:32 +0000 (16:12 +0000)]
Visit the condition variables of while and for loops; also, visit the
condition even when we've visited the condition variable, so that
we'll see implicit conversions there.

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

14 years agoUpdate C++ include paths for Exherbo, by Ingmar Vanhassel.
Benjamin Kramer [Mon, 25 Jan 2010 12:20:15 +0000 (12:20 +0000)]
Update C++ include paths for Exherbo, by Ingmar Vanhassel.

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

14 years agocindex/Python: Move translation unit load functions to Index, there isn't a good...
Daniel Dunbar [Mon, 25 Jan 2010 09:16:55 +0000 (09:16 +0000)]
cindex/Python: Move translation unit load functions to Index, there isn't a good reason to have separate static methods for this.

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

14 years agocindex/Python: Support file objects as unsaved_files, albeit inefficiently.
Daniel Dunbar [Mon, 25 Jan 2010 09:16:41 +0000 (09:16 +0000)]
cindex/Python: Support file objects as unsaved_files, albeit inefficiently.

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

14 years agoAdd missing header.
Ted Kremenek [Mon, 25 Jan 2010 05:19:37 +0000 (05:19 +0000)]
Add missing header.

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

14 years agoAdd missing file.
Ted Kremenek [Mon, 25 Jan 2010 04:48:38 +0000 (04:48 +0000)]
Add missing file.

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

14 years agoSplit libAnalysis into two libraries: libAnalysis and libChecker.
Ted Kremenek [Mon, 25 Jan 2010 04:41:41 +0000 (04:41 +0000)]
Split libAnalysis into two libraries: libAnalysis and libChecker.

(1) libAnalysis is a generic analysis library that can be used by
    Sema.  It defines the CFG, basic dataflow analysis primitives, and
    inexpensive flow-sensitive analyses (e.g. LiveVariables).

(2) libChecker contains the guts of the static analyzer, incuding the
    path-sensitive analysis engine and domain-specific checks.

Now any clients that want to use the frontend to build their own tools
don't need to link in the entire static analyzer.

This change exposes various obvious cleanups that can be made to the
layout of files and headers in libChecker.  More changes pending.  :)

This change also exposed a layering violation between AnalysisContext
and MemRegion.  BlockInvocationContext shouldn't explicitly know about
BlockDataRegions.  For now I've removed the BlockDataRegion* from
BlockInvocationContext (removing context-sensitivity; although this
wasn't used yet).  We need to have a better way to extend
BlockInvocationContext (and any LocationContext) to add
context-sensitivty.

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

14 years agomerge another one in.
Chris Lattner [Mon, 25 Jan 2010 03:38:26 +0000 (03:38 +0000)]
merge another one in.

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

14 years agoconsolidate two testcases.
Chris Lattner [Mon, 25 Jan 2010 03:37:52 +0000 (03:37 +0000)]
consolidate two testcases.

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

14 years agofix rdar://7556129 a crash in blocks debug info codegen.
Chris Lattner [Mon, 25 Jan 2010 03:34:56 +0000 (03:34 +0000)]
fix rdar://7556129 a crash in blocks debug info codegen.

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

14 years agosimplify code.
Chris Lattner [Mon, 25 Jan 2010 03:29:35 +0000 (03:29 +0000)]
simplify code.

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

14 years agocindex/Python: Add Cursor test.
Daniel Dunbar [Mon, 25 Jan 2010 00:44:21 +0000 (00:44 +0000)]
cindex/Python: Add Cursor test.

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

14 years agocindex/Python: Implement support for unsaved/remapped files.
Daniel Dunbar [Mon, 25 Jan 2010 00:44:11 +0000 (00:44 +0000)]
cindex/Python: Implement support for unsaved/remapped files.

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

14 years agoASTUnit: Don't check that input files exist when parsing ASTs from the command
Daniel Dunbar [Mon, 25 Jan 2010 00:44:02 +0000 (00:44 +0000)]
ASTUnit: Don't check that input files exist when parsing ASTs from the command
line -- they may be remapped (fake) files. This is useful for testing parsing
entirely from memory.

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

14 years agocindex/Python: Fix/simplify Index.parse() passing command line arguments.
Daniel Dunbar [Mon, 25 Jan 2010 00:43:31 +0000 (00:43 +0000)]
cindex/Python: Fix/simplify Index.parse() passing command line arguments.

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

14 years agoUpdate comment.
Daniel Dunbar [Mon, 25 Jan 2010 00:43:14 +0000 (00:43 +0000)]
Update comment.

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

14 years agocindex/Python: Update comments, add module docstrings, add LLVM headers.
Daniel Dunbar [Mon, 25 Jan 2010 00:43:08 +0000 (00:43 +0000)]
cindex/Python: Update comments, add module docstrings, add LLVM headers.

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

14 years agoCIndex: Don't crash when visitor passes null child statements, and sprinkle some
Daniel Dunbar [Mon, 25 Jan 2010 00:40:30 +0000 (00:40 +0000)]
CIndex: Don't crash when visitor passes null child statements, and sprinkle some
asserts in cursor construction functions to make this more obvious.

Doug, please check. c-index-test would previously crash on this code:
--
for(;;) {}
--
Do we need a custom visit of the for statement to cover the variable
declarations?

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

14 years agocindex/Python: Move Cursor.is_ methods to CursorKind, and add test.
Daniel Dunbar [Sun, 24 Jan 2010 21:20:39 +0000 (21:20 +0000)]
cindex/Python: Move Cursor.is_ methods to CursorKind, and add test.

Also, add CursorKind.get_all_kinds().

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

14 years agocindex/Python: Implement explicit objects for CursorKind enumeration values.
Daniel Dunbar [Sun, 24 Jan 2010 21:20:29 +0000 (21:20 +0000)]
cindex/Python: Implement explicit objects for CursorKind enumeration values.

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

14 years agocindex/Python: Fetch SourceLocation instantiation location information on lazily...
Daniel Dunbar [Sun, 24 Jan 2010 21:20:21 +0000 (21:20 +0000)]
cindex/Python: Fetch SourceLocation instantiation location information on lazily, it isn't free.

Also, add repr() support to SourceRange.

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

14 years agocindex/Python: Add Cursor.get_usr().
Daniel Dunbar [Sun, 24 Jan 2010 21:20:13 +0000 (21:20 +0000)]
cindex/Python: Add Cursor.get_usr().

Also, change Cursor.spelling to return None for non-decls, for consistency with get_usr().

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

14 years agocindex/Python: Return null cursors as None instead of exposing this notion.
Daniel Dunbar [Sun, 24 Jan 2010 21:20:05 +0000 (21:20 +0000)]
cindex/Python: Return null cursors as None instead of exposing this notion.

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

14 years agocindex/Python: Convert CXString objects to regular Python strings below API.
Daniel Dunbar [Sun, 24 Jan 2010 21:19:57 +0000 (21:19 +0000)]
cindex/Python: Convert CXString objects to regular Python strings below API.

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

14 years agoSimplify.
Daniel Dunbar [Sun, 24 Jan 2010 21:19:48 +0000 (21:19 +0000)]
Simplify.

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

14 years agocindex/Python: Remove Cursor.file forwarding method, this doesn't really fit the...
Daniel Dunbar [Sun, 24 Jan 2010 21:19:40 +0000 (21:19 +0000)]
cindex/Python: Remove Cursor.file forwarding method, this doesn't really fit the API.

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

14 years ago-fno-rtti is now the default.
Chris Lattner [Sun, 24 Jan 2010 20:43:31 +0000 (20:43 +0000)]
-fno-rtti is now the default.

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

14 years agoEnhance test to check on expected rewritten output.
Fariborz Jahanian [Sun, 24 Jan 2010 18:40:06 +0000 (18:40 +0000)]
Enhance test to check on expected rewritten output.

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

14 years agoFix a pretty bad bug where if a constructor (or conversion function) was marked as...
Anders Carlsson [Sun, 24 Jan 2010 17:15:04 +0000 (17:15 +0000)]
Fix a pretty bad bug where if a constructor (or conversion function) was marked as 'explicit', but then defined out-of-line, we would not treat it as being explicit.

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

14 years agoImplement [dcl.fct.spec]p6.
Anders Carlsson [Sun, 24 Jan 2010 16:49:46 +0000 (16:49 +0000)]
Implement [dcl.fct.spec]p6.

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

14 years agoOk, turn back off -Wunreachable-code by default.
Mike Stump [Sun, 24 Jan 2010 16:16:01 +0000 (16:16 +0000)]
Ok, turn back off -Wunreachable-code by default.

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

14 years agoMark PartialDiagnostic.h as a C++ header
Sebastian Redl [Sun, 24 Jan 2010 10:02:25 +0000 (10:02 +0000)]
Mark PartialDiagnostic.h as a C++ header

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

14 years agoLand test case.
Anders Carlsson [Sun, 24 Jan 2010 05:50:37 +0000 (05:50 +0000)]
Land test case.

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

14 years agoImplement instantiation of AsmStmts (Crazy, I know)
Anders Carlsson [Sun, 24 Jan 2010 05:50:09 +0000 (05:50 +0000)]
Implement instantiation of AsmStmts (Crazy, I know)

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

14 years agoTweak clang_visitChildren comment.
Daniel Dunbar [Sun, 24 Jan 2010 04:10:31 +0000 (04:10 +0000)]
Tweak clang_visitChildren comment.

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

14 years agocindex/Python: Add Cursor.get_children()
Daniel Dunbar [Sun, 24 Jan 2010 04:10:22 +0000 (04:10 +0000)]
cindex/Python: Add Cursor.get_children()

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

14 years agocindex/Python: Remove Declaration class, this has been removed from the API.
Daniel Dunbar [Sun, 24 Jan 2010 04:10:06 +0000 (04:10 +0000)]
cindex/Python: Remove Declaration class, this has been removed from the API.

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

14 years agocindex/Python: Eliminate Entity class, it has been removed from CIndex.
Daniel Dunbar [Sun, 24 Jan 2010 04:09:58 +0000 (04:09 +0000)]
cindex/Python: Eliminate Entity class, it has been removed from CIndex.

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

14 years agoSimplify.
Daniel Dunbar [Sun, 24 Jan 2010 04:09:51 +0000 (04:09 +0000)]
Simplify.

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

14 years agocindex/Python: Add TranslationUnit.cursor.
Daniel Dunbar [Sun, 24 Jan 2010 04:09:43 +0000 (04:09 +0000)]
cindex/Python: Add TranslationUnit.cursor.

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

14 years agocindex/Python: Tweak Source{Location,Range}
Daniel Dunbar [Sun, 24 Jan 2010 04:09:34 +0000 (04:09 +0000)]
cindex/Python: Tweak Source{Location,Range}
 - Add __repr__ on SourceLocation.

 - Fix File object construction to use c_object_p type, and use None instead of
   invalid File objects.

 - Make SourceRange.{start,end} properties.

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

14 years agocindex/Python: Make Cursor.is_... functions not properties.
Daniel Dunbar [Sun, 24 Jan 2010 04:09:23 +0000 (04:09 +0000)]
cindex/Python: Make Cursor.is_... functions not properties.

Also, add ValueError check before calling Cursor_spelling.

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

14 years agoMangle static variables with an extra name to distinguish them from non-static variab...
Sean Hunt [Sun, 24 Jan 2010 03:04:27 +0000 (03:04 +0000)]
Mangle static variables with an extra name to distinguish them from non-static variables in the same TU.
Fixes PR5966 for real this time; also reverts r92911, which had a incorrect fix.

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

14 years agoIndex.h: Tweak comments, delete trailing whitespace, fix a few typos, etc.
Daniel Dunbar [Sun, 24 Jan 2010 02:54:26 +0000 (02:54 +0000)]
Index.h: Tweak comments, delete trailing whitespace, fix a few typos, etc.

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

14 years agoInitial checkin of CIndex Python bindings, by Andrew Sutton!
Daniel Dunbar [Sun, 24 Jan 2010 02:02:07 +0000 (02:02 +0000)]
Initial checkin of CIndex Python bindings, by Andrew Sutton!
 - Some tweaks by me for API changes, Darwin, and x86_64 support. Still needs
   substantial updating to match recent CIndex API changes.

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

14 years agofix PR6034, a crash on invalid where the switch stack would get
Chris Lattner [Sun, 24 Jan 2010 01:50:29 +0000 (01:50 +0000)]
fix PR6034, a crash on invalid where the switch stack would get
unbalanced.

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

14 years agoadd a prototype for __builtin_fpclassify. We don't know how to
Chris Lattner [Sun, 24 Jan 2010 01:30:04 +0000 (01:30 +0000)]
add a prototype for __builtin_fpclassify.  We don't know how to
codegen it, so we get 'cannot compile this builtin function yet'
errors, just like we do currently for __builtin_isinf.  However,
this should let us parse headers that use it without barfing,
which should help PR6083.

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

14 years agodisable this test, it is failing sporadically.
Chris Lattner [Sun, 24 Jan 2010 00:30:31 +0000 (00:30 +0000)]
disable this test, it is failing sporadically.

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

14 years agoFix a nasty bug where temporaries weren't marked as being conditional in some cases.
Anders Carlsson [Sun, 24 Jan 2010 00:20:05 +0000 (00:20 +0000)]
Fix a nasty bug where temporaries weren't marked as being conditional in some cases.

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

14 years agoUse new initialization code when dealing with [dcl.init.aggr]p12. This fixes the...
Anders Carlsson [Sun, 24 Jan 2010 00:19:41 +0000 (00:19 +0000)]
Use new initialization code when dealing with [dcl.init.aggr]p12. This fixes the bug where array elements and member initializers weren't copied correctly.

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

14 years agoChange all InitializedEntity pointers over to be references.
Anders Carlsson [Sat, 23 Jan 2010 23:23:01 +0000 (23:23 +0000)]
Change all InitializedEntity pointers over to be references.

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

14 years agoStart passing InitializedEntity to CheckDesignatedInitializer.
Anders Carlsson [Sat, 23 Jan 2010 22:49:02 +0000 (22:49 +0000)]
Start passing InitializedEntity to CheckDesignatedInitializer.

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

14 years agoPreserve access for enum constants during template instantiation.
John McCall [Sat, 23 Jan 2010 22:37:59 +0000 (22:37 +0000)]
Preserve access for enum constants during template instantiation.

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

14 years agoMore init work, adding more entity parameters.
Anders Carlsson [Sat, 23 Jan 2010 20:47:59 +0000 (20:47 +0000)]
More init work, adding more entity parameters.

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

14 years agoTemporary flip default for -Wunreachable-code so some bots can test it
Mike Stump [Sat, 23 Jan 2010 20:23:40 +0000 (20:23 +0000)]
Temporary flip default for -Wunreachable-code so some bots can test it
out.  They should all be done later tonight, but if something bad
happens, feel free to revert sooner.

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

14 years agoUse the new init code for member subobjects.
Anders Carlsson [Sat, 23 Jan 2010 20:20:40 +0000 (20:20 +0000)]
Use the new init code for member subobjects.

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

14 years agoSwitch some array initialization over to the new init code.
Anders Carlsson [Sat, 23 Jan 2010 20:13:41 +0000 (20:13 +0000)]
Switch some array initialization over to the new init code.

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

14 years agoInsulate these from changes to the default for -Wunreachable-code.
Mike Stump [Sat, 23 Jan 2010 20:12:18 +0000 (20:12 +0000)]
Insulate these from changes to the default for -Wunreachable-code.

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

14 years agoBaby steps towards migrating the InitListChecker over to the new initialization code...
Anders Carlsson [Sat, 23 Jan 2010 19:55:29 +0000 (19:55 +0000)]
Baby steps towards migrating the InitListChecker over to the new initialization code. Pass an InitializedEntity pointer through to most init checker functions. Right now, it's ignored everywhere except when initializing vectors in C++.

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

14 years agoWhen an InitializedEntity is passed to CheckSingleInitializer, call the new Sema...
Anders Carlsson [Sat, 23 Jan 2010 19:22:30 +0000 (19:22 +0000)]
When an InitializedEntity is passed to CheckSingleInitializer, call the new Sema::PerformCopyInitialization overload.

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

14 years agoAdd bzero builtin; this should help codegen quality for code using this
Eli Friedman [Sat, 23 Jan 2010 19:00:10 +0000 (19:00 +0000)]
Add bzero builtin; this should help codegen quality for code using this
function.

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

14 years agoChange CheckSingleInitializer to take/return OwningExprResults instead. No functional...
Anders Carlsson [Sat, 23 Jan 2010 18:35:41 +0000 (18:35 +0000)]
Change CheckSingleInitializer to take/return OwningExprResults instead. No functionality change.

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

14 years agoFix typo.
Anders Carlsson [Sat, 23 Jan 2010 18:26:49 +0000 (18:26 +0000)]
Fix typo.

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

14 years agoSimplify code with StringRef.
Benjamin Kramer [Sat, 23 Jan 2010 18:16:35 +0000 (18:16 +0000)]
Simplify code with StringRef.

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

14 years agoNo need to terminate this buffer.
Benjamin Kramer [Sat, 23 Jan 2010 18:16:07 +0000 (18:16 +0000)]
No need to terminate this buffer.

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

14 years agoAdd doxygen comment to clang_getClangVersion().
Ted Kremenek [Sat, 23 Jan 2010 17:51:23 +0000 (17:51 +0000)]
Add doxygen comment to clang_getClangVersion().

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

14 years agoAdjust testcase for recent AsmPrinter changes, sigh.
Benjamin Kramer [Sat, 23 Jan 2010 10:15:32 +0000 (10:15 +0000)]
Adjust testcase for recent AsmPrinter changes, sigh.

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

14 years agoAdjust testcase for recent DWARF printer changes.
Benjamin Kramer [Sat, 23 Jan 2010 10:14:58 +0000 (10:14 +0000)]
Adjust testcase for recent DWARF printer changes.

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

14 years agoProduce a special diagnostic when users call a function with an argument of
John McCall [Sat, 23 Jan 2010 08:10:49 +0000 (08:10 +0000)]
Produce a special diagnostic when users call a function with an argument of
incomplete type (or a pointer/reference to such).

The causes of this problem are different enough to justify a different "design"
for the diagnostic.  Most notably, it doesn't give an operand index:
it's usually pretty obvious which operand is the problem, it adds a lot of
clutter to mention it, and the fix is usually in a different part of the file
anyway.

This is yet another diagnostic that should really have an analogue in the
non-overloaded case --- which should be much easier to write because of
the weaker space constraints.

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

14 years agoFix the EntityKind order so that all entity kinds that can be copied (using copy...
Anders Carlsson [Sat, 23 Jan 2010 05:47:27 +0000 (05:47 +0000)]
Fix the EntityKind order so that all entity kinds that can be copied (using copy constructors) come first. Also, fix a bug where EK_New was left out of the err_init_conversion_failed diagnostic (It is now reported as 'new value'). Please review Doug :)

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

14 years agoDuring overload resolution diagnostics, sort non-viable candidates by the quality...
John McCall [Sat, 23 Jan 2010 05:17:32 +0000 (05:17 +0000)]
During overload resolution diagnostics, sort non-viable candidates by the quality of their
conversions.  To make this work, fill out all conversions for all candidates
(but only when diagnosing overload failure).  Split out a few cases from
ovl_fail_bad_conversion which didn't actually involve a failed argument
conversion.

I'm pretty sure this is not a well-founded ordering, but I'm not sure it matters.

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

14 years agoSeparate EK_ArrayOrVectorElement into EK_ArrayElement and EK_VectorElement; arrays...
Anders Carlsson [Sat, 23 Jan 2010 04:34:47 +0000 (04:34 +0000)]
Separate EK_ArrayOrVectorElement into EK_ArrayElement and EK_VectorElement; arrays and vectors are pretty different beasts in C++. Doug, please review/comment.

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

14 years agoCreated __builtin___NSStringMakeConstantString() builtin, which generates constant...
David Chisnall [Sat, 23 Jan 2010 02:40:42 +0000 (02:40 +0000)]
Created __builtin___NSStringMakeConstantString() builtin, which generates constant Objective-C strings.

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

14 years agoRename getClangFullVendorVersion() to getClangFullVersion().
Ted Kremenek [Sat, 23 Jan 2010 02:11:34 +0000 (02:11 +0000)]
Rename getClangFullVendorVersion() to getClangFullVersion().

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

14 years agoImplement elementary access control.
John McCall [Sat, 23 Jan 2010 00:46:32 +0000 (00:46 +0000)]
Implement elementary access control.

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

14 years agoTeach the cursor visitor to recurse into the type information of
Douglas Gregor [Sat, 23 Jan 2010 00:40:08 +0000 (00:40 +0000)]
Teach the cursor visitor to recurse into the type information of
explicit casts, sizeof, alignof, and compound literals.

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

14 years agoExtern darwin-clang_rt.c test to also test targetting ARM ({armv6, armv7} x
Daniel Dunbar [Sat, 23 Jan 2010 00:26:38 +0000 (00:26 +0000)]
Extern darwin-clang_rt.c test to also test targetting ARM ({armv6, armv7} x
{thumb,no-thumb}).

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

14 years agoFix a FIXME, this test folds to a constant now.
Daniel Dunbar [Sat, 23 Jan 2010 00:26:29 +0000 (00:26 +0000)]
Fix a FIXME, this test folds to a constant now.

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

14 years agoExtend clang_createTranslationUnitFromSourceFile() to support creating
Douglas Gregor [Sat, 23 Jan 2010 00:14:00 +0000 (00:14 +0000)]
Extend clang_createTranslationUnitFromSourceFile() to support creating
translation units that include unsaved files.

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