Commit Graph

29330 Commits

Author SHA1 Message Date
Ken Dyck 075de167f8 Convert local offset variable to CharUnits in AddVCallOffsets. No change in
functionality intended.

llvm-svn: 128522
2011-03-30 01:21:33 +00:00
Ken Dyck 078f3e6905 Convert a local offset variable to CharUnits. No change in functionality
intended.

llvm-svn: 128521
2011-03-30 01:14:22 +00:00
Ken Dyck 032a903982 Convert the OffsetInLayoutClass parameter of DeterminePrimaryVirtualBases()
to CharUnits. No change in functionality intended.

llvm-svn: 128520
2011-03-30 01:10:23 +00:00
Ken Dyck 45956a467e Convert the OffsetInLayoutClass parameter of LayoutSecondaryVTables to
CharUnits. No change in functionality intended.

llvm-svn: 128516
2011-03-30 00:50:28 +00:00
Devang Patel 4d7612744f Fix in r128471 is very broad. Some of the unconditional branches need line number information for better user experience.
Restrict the fix. This fixes break.exp failures from gdb testsuite.

llvm-svn: 128513
2011-03-30 00:08:31 +00:00
Argyrios Kyrtzidis 84d7907797 [analyzer] Allow all checkers of a group to be enabled.
llvm-svn: 128512
2011-03-29 23:57:41 +00:00
Argyrios Kyrtzidis 437758cbe6 [analyzer] For -analyzer-checker-help show all the info about groups, packages, and which packages/checkers are hidden.
llvm-svn: 128511
2011-03-29 23:57:38 +00:00
Jeffrey Yasskin cb40757195 Add a libstdc++-4.4 patch for C++0x to the website.
llvm-svn: 128498
2011-03-29 22:27:50 +00:00
Devang Patel adc35e28fc Robustify test string.
llvm-svn: 128486
2011-03-29 21:06:43 +00:00
Oscar Fuentes fda6a4c33a CMake: removed some unnecesary conditionals from add_clang_library.
llvm-svn: 128483
2011-03-29 20:51:00 +00:00
Devang Patel 298ecb3aaf Add target triple.
llvm-svn: 128480
2011-03-29 20:00:06 +00:00
Argyrios Kyrtzidis 4ee039647a [analyzer] Checker Packages can now belong to a group. This requires llvm commit r128474.
llvm-svn: 128475
2011-03-29 18:54:02 +00:00
Chandler Carruth 7750f7694c Fix an unused variable warning in release builds and make the
assert-less codepath marginally more efficient.

llvm-svn: 128472
2011-03-29 18:38:10 +00:00
Devang Patel 6f2e41e0d4 Do not line number entry for unconditional branches. Usually, users do not want to stop at closing '}'.
llvm-svn: 128471
2011-03-29 18:35:54 +00:00
John Thompson f71173043f Fixed build error.
llvm-svn: 128470
2011-03-29 18:31:21 +00:00
Francois Pichet 117d23c5bc Add a triple to make the test friendly on no windows platform.
llvm-svn: 128459
2011-03-29 11:38:04 +00:00
Francois Pichet 3096d209bf Accept __declspec(dllimport) for function defined at class scope in Microsoft mode.
This fixes a bunch of errors when compiling MSVC header files with the -DDLL flag.

llvm-svn: 128457
2011-03-29 10:39:17 +00:00
Chandler Carruth ffce245700 Fix a bug in how we were resolving the address of overloaded functions
when the resolution took place due to a single template specialization
being named with an explicit template argument list. In this case, the
"resolution" doesn't take into account the target type at all, and
therefore can take place for functions, static member functions, and
*non-static* member functions. The latter weren't being properly checked
and their proper form enforced in this scenario. We now do so.

The result of this last form slipping through was some confusing logic
in IsStandardConversion handling of these resolved address-of
expressions which eventually exploded in an assert. Simplify this logic
a bit and add some more aggressive asserts to catch improperly formed
expressions getting into this routine.

Finally add systematic testing of member functions, both static and
non-static, in the various forms they can take. One of these is
essentially PR9563, and this commit fixes the crash in that PR. However,
the diagnostics for this are still pretty terrible. We at least are now
accepting the correct constructs and rejecting the invalid ones rather
than accepting invalid or crashing as before.

llvm-svn: 128456
2011-03-29 08:08:18 +00:00
Ted Kremenek 03325c4be9 Add workaround for Sema issue found in <rdar://problem/9188004>, which leads to an assertion failure in the uninitialized variables analysis. The problem is that Sema isn't properly registering a variable in a DeclContext (which -Wuninitialized relies on), but
my expertise on the template instantiation logic isn't good enough to fix this problem for real.  This patch worksaround the
problem in -Wuninitialized, but we should fix it for real later.

llvm-svn: 128443
2011-03-29 01:40:00 +00:00
Argyrios Kyrtzidis ba699d611b Don't do the checks of Sema::DiagnoseEqualityWithExtraParens() on type-dependent expressions. Fixes rdar://9027658.
llvm-svn: 128437
2011-03-28 23:52:04 +00:00
Fariborz Jahanian b24b568725 Implements property of reference types. Adding
an executable test to llvm test suite.
// rdar://9070460.

llvm-svn: 128435
2011-03-28 23:47:18 +00:00
Daniel Dunbar 67919b2a5b Integrated-As: Support -Wa,-L when using the integrated assembler.
llvm-svn: 128433
2011-03-28 22:49:28 +00:00
Daniel Dunbar 9cf7bc7a6c Frontend/cc1as: Add support for -L.
llvm-svn: 128432
2011-03-28 22:49:24 +00:00
Anton Yartsev 93900c7d1e refactoring
llvm-svn: 128427
2011-03-28 21:00:05 +00:00
Fariborz Jahanian d0d31bf263 Also 'self' in blocks need be handled specially.
// rdar://9181463

llvm-svn: 128410
2011-03-28 16:23:34 +00:00
Eli Friedman 9db11f82a5 Remove stray null from the middle of a comment. (Found because my editor
was refusing to open the file.)

llvm-svn: 128402
2011-03-28 02:00:21 +00:00
Matt Beaumont-Gay 93615d9912 Fix PR9572 and neighboring lurking crashers.
llvm-svn: 128401
2011-03-28 01:39:13 +00:00
Chandler Carruth 86d17d3f76 Reduce indentation using early exits and add a couple of comments. No
functionality changed.

llvm-svn: 128396
2011-03-27 21:26:48 +00:00
Chandler Carruth 82701204a4 Add my test case for r128353. I think this is the last test case to fail
to be added... Sorry for the noise.

llvm-svn: 128395
2011-03-27 21:03:41 +00:00
Chandler Carruth edcc04e05b Add tests for the uninitialized checks added in r128376. Also clean up
and flesh out the existing uninitialized testing for field initializers.

The tests come from Richard's original patch, but I've cleaned them up
a bit and ordered them more naturally.

Also, I added a test for the most simple base case:
int x = x;

And it turns out we miss this one! =[ That and another bad FIXME on the
field initializer checking are left in the test.

llvm-svn: 128394
2011-03-27 20:35:59 +00:00
Ken Dyck f9742cca31 Convert offset parameter in LayoutPrimaryAndSecondaryVTables() to CharUnits.
No change in functionality intended.

llvm-svn: 128393
2011-03-27 20:33:38 +00:00
Ken Dyck 9a7e532dd8 Convert VTableBuilder::MostDerivedClassOffset to CharUnits. No change in
functionality intended.

llvm-svn: 128392
2011-03-27 20:20:28 +00:00
Ken Dyck 0d5804a622 Convert FinalOverriders::MostDerivedClassOffset to CharUnits. No change in
functionality intended.

llvm-svn: 128391
2011-03-27 20:10:29 +00:00
Chandler Carruth 24284afa2d Flip the default for showing include stacks on notes to false. This
required modifying a few tests that specifically use note include stacks
to check the source manager's view of include stacks. I've simply added
the flag to these tests for now, they may have to be more substantially
changed if we decide to remove support for note include stacks
altogether.

Also, add a test for include stacks on notes that was supposed to go in
with the previous commit.

llvm-svn: 128390
2011-03-27 20:00:08 +00:00
Fariborz Jahanian b3b1e17645 'self' is objective-c's 'self' objc pointer only in
an objc method. Fixes // rdar://9181463

llvm-svn: 128389
2011-03-27 19:53:47 +00:00
Francois Pichet 4e7a2c09b2 Improve recovery (error + fix-it) when parsing type dependent template name without the "template" keyword.
For example:
   typename C1<T>:: /*template*/ Iterator<0> pos; 

Also the error is downgraded to an ExtWarn in Microsoft mode.

llvm-svn: 128387
2011-03-27 19:41:34 +00:00
Ken Dyck 5f3601d35a Remove a fixed FIXME comment (the base offset has already been converted to
CharUnits).

llvm-svn: 128386
2011-03-27 19:19:52 +00:00
Ken Dyck f4be03ae04 Convert the offset parameters of AddMethods() to CharUnits. No change in
functionality intended.

llvm-svn: 128385
2011-03-27 19:15:11 +00:00
Ken Dyck f736d9cb75 Convert the BaseOffsetInLayoutClass parameter of ComputeThisAdjustment() to
CharUnits. No change in functionality intended.

llvm-svn: 128384
2011-03-27 19:03:44 +00:00
Ken Dyck 7d876f3649 Convert offset members in MethodInfo to CharUnits. No change in
functionality intended.

llvm-svn: 128383
2011-03-27 18:57:53 +00:00
Anton Yartsev 530deb9a39 AltiVec vector comparison logic now affect only vectors of fundamental AltiVec vector types. It fixes bug 9347.
llvm-svn: 128381
2011-03-27 15:36:07 +00:00
Douglas Gregor 0a1650feae Clang supports __STDC_HOSTED__. Patch by Jonathan Sauer
llvm-svn: 128377
2011-03-27 09:49:38 +00:00
Chandler Carruth 33bf3e758d Diagnose uninitialized uses of a variable within its own initializer.
This is basically the same idea as the warning on uninitialized uses of
fields within an initializer list. As such, it is on by default and
under -Wuninitialized.

Original patch by Richard Trieu, with some massaging from me on the
wording and grouping of the diagnostics.

llvm-svn: 128376
2011-03-27 09:46:56 +00:00
Anton Yartsev 28ccef788b supported: AltiVec vector initialization with a single literal according to PIM section 2.5.1 - after initialization all elements have the value specified by the literal
llvm-svn: 128375
2011-03-27 09:32:40 +00:00
John McCall 358d056c14 We were emitting construction v-tables with internal linkage all the time.
Emit them instead with the linkage of the VTT.

I'm actually really ambivalent about this;  it's what GCC does, but outside
of improving code size (if the linkage is coalescing), I'm not sure it's
at all relevant.  Construction vtables are naturally referenced only by the
VTT, which is itself only referenced by complete-object constructors and
destructors;  giving the construction vtables possibly-external linkage is
important if you have an optimization that drills through the VTT to a
reference to a particular construction vtable which it cannot just emit
itself.

llvm-svn: 128374
2011-03-27 09:00:25 +00:00
NAKAMURA Takumi 823f3eb142 www/get_started.html: Fix a few URLs.
llvm-svn: 128372
2011-03-27 02:04:21 +00:00
Chandler Carruth b6766f07c8 Add an option to suppress include stack printing on note diagnostics.
These stacks are often less important than those on primary diagnostics.

As the number of notes grows, this becomes increasingly important. The
include stack printing is clever and doesn't print stacks for adjacent
diagnostics from the same file, but when a note is in between a sequence
of errors in a header file, and the notes all refer to some other file,
we end up getting a worst-case ping-pong of include stacks that take up
a great deal of vertical space.

Still, for now, the default behavior isn't changed. We can evaluate user
feedback with the flag.

Patch by Richard Trieu, a couple of style tweaks from me.

llvm-svn: 128371
2011-03-27 01:50:55 +00:00
Chandler Carruth 6e50103acd Add -f[no-]strict-overflow to the Clang driver. Use it to set the
default for -fwrapv if that flag isn't specified explicitly. We always
prefer an explict setting of -fwrapv when present. Also adds support for
-fno-wrapv to allow disabling -fwrapv even when -fno-strict-overflow is
passed.

llvm-svn: 128353
2011-03-27 00:04:55 +00:00
Douglas Gregor a172e08824 Improve -Wheader-hygiene to warn about using directives inside linkage
specifications within the global scope, from Elliot Glaysher.

llvm-svn: 128352
2011-03-26 22:25:30 +00:00
Fariborz Jahanian 071caefef2 More coherent diagnostic attempting to assign to a member of a const object returned
from an objective-c message: // rdar://9005189

llvm-svn: 128348
2011-03-26 19:48:30 +00:00