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

1978 Коммитов

Автор SHA1 Сообщение Дата
Ted Kremenek e03a2f39ac Renamed FullContextSourceLocation to FullSourceLoc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44947 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 18:32:04 +00:00
Ted Kremenek b71d5f8111 Added utility static method to FullContextSourceLocation
for creating "invalid" location objects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44946 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 18:20:34 +00:00
Chris Lattner 0e391052d7 make it a bit more clear in what way the ivar is consistent.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44945 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 18:19:52 +00:00
Chris Lattner 5564e07af5 add an ivar_size() method that never returns -1.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44944 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 18:19:33 +00:00
Ted Kremenek 25bb23aa20 Constified a predicate method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44943 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 18:18:05 +00:00
Ted Kremenek a9793ed6a7 Added class FullContextSourceLocation: a tuple class that
contains both a SourceLocation and its associated
SourceManager. This class is useful for argument passing to
functions that expect both objects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44942 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 18:16:46 +00:00
Chris Lattner 609e4c72d9 simplify some code, bump j. This fixes the remaining test failures.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44941 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 18:11:49 +00:00
Ted Kremenek bbced580c9 Moved construction of TargetInfo objects out of the Driver
and into the "Basic" library. TargetInfo objects are now
constructed from triples by calling the static method
TargetInfo::CreateTargetInfo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44940 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 18:05:32 +00:00
Chris Lattner 23c3bb768f handle the -1'ness of undefined lists
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44939 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 18:02:31 +00:00
Chris Lattner 4c52509ffb unbreak the build. I'm still working on test failures.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44938 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 17:58:05 +00:00
Chris Lattner 33ef2590b9 fix typo
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44932 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 08:17:45 +00:00
Chris Lattner be6df088d6 more cleanups changing things like getInstanceVariables to iterators.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44930 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 07:56:42 +00:00
Chris Lattner ab4c4d5e5e resolve some fixmes and clean up some code by eliminating the get*Vars apis to some classes and use iterators instead.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44927 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 07:46:12 +00:00
Chris Lattner 0157c51445 start cleaning up interfaces for objc bits and pieces by switching to an
iterator interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44926 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 07:30:05 +00:00
Chris Lattner 4d3914836e split objc pieces of SemaDecl.cpp out into SemaDeclObjC.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44925 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 07:09:47 +00:00
Ted Kremenek 5399ce26f2 Added back VisitDeclStmt() to the StmtDumper, essentially reverting r44920:
http://llvm.org/viewvc/llvm-project?rev=44920&view=rev

Putting VisitDeclStmt() was motivated because it called DumpDeclarator(),
which printed out a little bit more information than just using the
child_iterator interface to visit the subexpressions of DeclStmt. To avoid
printing the initializers twice, DumpSubTree() now specially checks for
DeclStmts; in such cases it calls VisitDeclStmt() without using the
child_iterators to visit the subexpressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44924 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 06:59:42 +00:00
Chris Lattner e8b724d481 move function to a more logical location, add its grammar productions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44923 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 06:56:32 +00:00
Chris Lattner fbb9898a5e remove todo
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44922 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 06:54:22 +00:00
Ted Kremenek f155e461ce Removed VisitDeclStmt(). The initializers of a DeclStmt are now automatically
printed out by DumpSubTree() via the child_iterator interface. This fixes a
bug where the initializers were being dumped twice.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44920 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 06:44:12 +00:00
Chris Lattner beb663677a Unbreak -stats on cocoa.h
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44919 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 06:43:05 +00:00
Chris Lattner a027b86f70 add run lines.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44918 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 06:22:14 +00:00
Chris Lattner 4c88d3a71f add run line
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44917 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 06:20:40 +00:00
Chris Lattner 5113613c5b add runline, make this test real.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44916 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 06:20:18 +00:00
Chris Lattner 32a3999c62 verify that tests contain RUN lines.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44915 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 06:19:22 +00:00
Chris Lattner dcc2cbcd40 simplify some code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44913 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 06:13:27 +00:00
Chris Lattner ca5eede5fa implement correct semantic analysis for shifts. For:
int test(int x, long long y) {
  return x << y;
}

we now realize the type of the shift is int, not long long.

This fixes a fixme from june.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44912 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 05:47:28 +00:00
Chris Lattner 6590d21767 Simplify some code, don't force the triple to a darwin triple if non-darwin.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44911 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 05:01:48 +00:00
Chris Lattner aeae19c427 typo reported by Gabor Greif
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44909 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 04:22:37 +00:00
Chris Lattner a9e6372208 Fix a codegen crash on test/CodeGen/cast.c, reported by Keith.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44908 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 04:13:20 +00:00
Chris Lattner 45918f3db5 fix typo pointed out by gordon
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44906 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 03:33:41 +00:00
Chris Lattner 4619366f8e fix expected errors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44901 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 01:15:04 +00:00
Fariborz Jahanian 2d6410dc91 Add -pedantic so test passes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44900 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 01:06:09 +00:00
Chris Lattner b3a99cd5bc Add ObjC parser support for concatenated ObjC strings. Note that
this is passed to sema and ignored there, so the second part of the
string will not make it into the AST.  Passing to Fariborz to finish
Sema + AST construction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44898 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 01:04:12 +00:00
Fariborz Jahanian 4ffc54111f Implemented type checking for pointer of objects of protocol-qualified types.
Note that incompatible-protocol-qualified-types.m is currently failing. This is
unrelated to this patch and Steve is looking at the general problem of not reporting
incompitible pointer types in return stetement..


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44897 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 01:00:23 +00:00
Ted Kremenek 31e703b588 Moved creation of SourceManager, HeaderSearch, TargetInfo, and LangOptions
into the loop that processes input files. These will soon become translation
unit specific (with the exception of LangOptions).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44893 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11 23:28:38 +00:00
Chris Lattner 33b7b0673a simplify code now that isConstantExpr really does always
return a loc.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44890 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11 23:15:04 +00:00
Chris Lattner 239c15e5b0 Fix a case where we'd return "is not a constant expr" without
return a location.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44889 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11 23:11:17 +00:00
Fariborz Jahanian 291e04b296 80-column please.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44888 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11 23:04:08 +00:00
Ted Kremenek 2eefd8657c Modified the internals of Diagnostic and DiagnosticClient to use
SourceManager*'s instead of SourceManager&'s. This allows the client specify a
NULL SourceManager when using a default constructed SourceLocation. Thus the
SourceManager can be NULL when the SourceLocation's isValid() == false.

The interface to most clients of Diagnostic remains the same.
Diagnostic::Report() is overload to either accept a SourceLocation and a
SourceManager&, or neither. Thus clients that do not have a SourceManager
cannot specify a SourceLocation.

Modified TextDiagnostics* to use this new interface.
Modified the driver to not passed in SourceManager when warning about "-I-".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44887 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11 22:57:35 +00:00
Fariborz Jahanian 61477f7a4c Implemented rewriting of protocol-qualified global variable types.
Re-implemented some of rewriting of protocol-qualified function 
argument types to support it in its generality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44886 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11 22:50:14 +00:00
Chris Lattner c26df99865 gcc supports more targets.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44885 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11 22:32:45 +00:00
Chris Lattner 0b11baa309 update pch discussion
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44884 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11 22:29:38 +00:00
Chris Lattner 0fcc09e4b6 improve title
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44883 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11 22:26:03 +00:00
Chris Lattner 03c58a3c96 add a con of clang vs gcc
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44882 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11 22:22:59 +00:00
Devang Patel fe2419aac4 Match union field type when member expression is u->x
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44879 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11 21:33:16 +00:00
Ted Kremenek 7a9d49fd2b Mega-patch: ripped SourceManager out of Diagnostic/DiagnosticClient. Now
SourceManager is passed by reference, allowing the SourceManager to be
associated with a specific translation unit, and not the entire execution
of the driver.

Modified all users of Diagnostics to comply with this new interface.

Integrated SourceManager as a member variable of TargetInfo. TargetInfo will
eventually be associated with a single translation unit (just like
SourceManager).

Made the SourceManager reference in ASTContext private. Provided accessor
getSourceManager() for clients to use instead. Modified clients to comply with
new interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44878 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11 21:27:55 +00:00
Fariborz Jahanian e66894c3de Refactor Rewritetest::RewriteObjcQualifiedInterfaceTypes in preparation for more
general use.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44876 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11 19:56:36 +00:00
Devang Patel 382c643652 Refactor bit-field handling code into a separate method.
No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44875 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11 19:51:39 +00:00
Fariborz Jahanian 0105556097 For @optional unimplemented methods do not issue the warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44872 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11 19:10:26 +00:00
Fariborz Jahanian f366b4c844 Fixed a parsing bug whereby @optional/@required keyword is not followed by
a method declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44870 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11 18:34:51 +00:00