Chandler Carruth
9779830513
Move the HilightRange method from TextDiagnosticPrinter down to
...
CaretDiagnostic. It's completely generic, with nothing to do with the
diagnostic client or info APIs.
llvm-svn: 139227
2011-09-07 07:02:31 +00:00
Chandler Carruth
e79ddf8c67
Hoist the tab expansion into a helper function.
...
llvm-svn: 139226
2011-09-07 05:36:50 +00:00
Chandler Carruth
0f1006a95a
Don't compute the same line number in two places, once inside a loop.
...
llvm-svn: 139225
2011-09-07 05:01:10 +00:00
Eli Friedman
ce3e2c85b1
Make sure the FunctionDecl's created by "#pragma weak" have correct ParmVarDecl's. PR10878.
...
llvm-svn: 139224
2011-09-07 04:05:06 +00:00
Argyrios Kyrtzidis
9d4fac0f9f
[arcmt] Remove xfail on test for windows, Takumi reported that it passes mingw and msvc.
...
llvm-svn: 139223
2011-09-07 03:43:41 +00:00
Argyrios Kyrtzidis
7d500b3457
operator->() in PreprocessingRecord::iterator is useless since we
...
are returning a pointer to pointer.
llvm-svn: 139222
2011-09-07 03:43:39 +00:00
Eli Friedman
e978d2f644
Relax the MemOperands on atomics a bit. Fixes -verify-machineinstrs failures for atomic laod/store on ARM.
...
(The fix for the related failures on x86 is going to be nastier because we actually need Acquire memoperands attached to the atomic load instrs, etc.)
llvm-svn: 139221
2011-09-07 02:23:42 +00:00
Joerg Sonnenberger
3d76f312b2
Dependency should be on the output file name, not the dependency file
...
name.
llvm-svn: 139220
2011-09-07 02:12:03 +00:00
Richard Trieu
f9bd0f5d99
Rename variables in SemaExpr.cpp to give a more consistant naming scheme.
...
ExprResult LHS, RHS,
Expr *LHSExpr, *RHSExpr
QualType LHSType, RHSType
Functions changed:
DiagnoseLogicalAndInLogicalOrLHS()
DiagnoseBinOpPrecedence()
ActOnBinOp()
BuildBinOp()
llvm-svn: 139219
2011-09-07 02:02:10 +00:00
Richard Trieu
4a287fb926
Rename variables in SemaExpr.cpp to give a more consistant naming scheme.
...
ExprResult LHS, RHS,
Expr *LHSExpr, *RHSExpr
QualType LHSType, RHSType
Functions changed:
CreateBuiltinBinOp()
DiagnoseBitwisePrecedence()
llvm-svn: 139218
2011-09-07 01:49:20 +00:00
Chandler Carruth
773757a962
Switch the CharSourceRange array to a small vector. The array was
...
a stack array of a magical size with an assert() that we never
overflowed it. That seems incredibly risky. We also have a very nice API
for bundling up a vector we expect to usually have a small size without
loss of functionality or security if the size is excessive.
The fallout is to remove the last pointer+size parameter pair that are
traced through the recursive caret diagnostic emission.
llvm-svn: 139217
2011-09-07 01:47:09 +00:00
Eli Friedman
e9f8113ec4
Switch clang over to using fence/atomicrmw/cmpxchg instead of the intrinsics (which will go away). LLVM CodeGen does almost exactly the same thing with these and the old intrinsics, so I'm reasonably confident this will not break anything.
...
There are still a few issues which need to be resolved with code generation for atomic load and store, so I'm not converting the places which need those for now.
I'm not entirely sure what to do about __builtin_llvm_memory_barrier: the fence instruction doesn't expose all the possibilities which can be expressed by __builtin_llvm_memory_barrier. I would appreciate hearing from anyone who is using this intrinsic.
llvm-svn: 139216
2011-09-07 01:41:24 +00:00
Richard Trieu
da4f43a609
Rename variables in SemaExpr.cpp to give a more consistant naming scheme.
...
ExprResult LHS, RHS,
Expr *LHSExpr, *RHSExpr
QualType LHSType, RHSType
Functions changed:
CheckAssignmentOperands()
DiagnoseSelfAssignment()
checkArithmeticNull()
llvm-svn: 139215
2011-09-07 01:33:52 +00:00
Richard Trieu
bcce2f7189
Rename variables in SemaExpr.cpp to give a more consistant naming scheme.
...
ExprResult LHS, RHS,
Expr *LHSExpr, *RHSExpr
QualType LHSType, RHSType
Functions changed:
CheckVectorCompareOperands()
CheckBitwiseOperands()
CheckLogicalOperands()
llvm-svn: 139214
2011-09-07 01:19:57 +00:00
Richard Trieu
aa5e256c20
Change the self-reference visitor (which gives the warning for self-reference oninitalization warning of -Wuninitialized) to exclude member variables that can decay into pointers. This will cause it to no longer warn on this code:
...
struct foo { char a[100], *e; } bar = { .e = bar.a };
llvm-svn: 139213
2011-09-07 00:58:53 +00:00
Fariborz Jahanian
5f2b703651
objc-gc: Don't force a __strong type'd property
...
to be 'weak'. This prevents a crash and should
probably be flagged as error - later to come.
llvm-svn: 139211
2011-09-07 00:38:49 +00:00
Francois Pichet
bcf6471010
In Microsoft mode, if we are inside a template class member function and we can't resolve a function call then create a type-dependent CallExpr even if the function has no type dependent arguments. The goal is to postpone name lookup to instantiation time to be able to search into type dependent base classes.
...
With this patch in, clang will generate only 37 errors (down from 212) when parsing a typical MFC source file.
llvm-svn: 139210
2011-09-07 00:14:57 +00:00
Johnny Chen
9d814e0dd2
Minor change: compare the return val of DNBWatchpointSet() against INVALID_NUB_WATCH_ID
...
to determine its validity.
llvm-svn: 139209
2011-09-07 00:09:23 +00:00
Devang Patel
9de7a7db26
While sinking machine instructions, sink matching DBG_VALUEs also otherwise live debug variable pass will drop DBG_VALUEs on the floor.
...
llvm-svn: 139208
2011-09-07 00:07:58 +00:00
Chad Rosier
e75ef40843
[driver] When clang crashes, don't try to generate diagnostics (i.e.,
...
preprocessor output) with multiple -arch options.
llvm-svn: 139207
2011-09-06 23:52:36 +00:00
Bill Wendling
226c4ed92a
Reenable compact unwind by default. However, also emit the old version of unwind
...
information for older linkers.
llvm-svn: 139206
2011-09-06 23:47:14 +00:00
Owen Anderson
f4f09f8c26
memset_pattern16 uses a 16 BYTE pattern, not a 16 BIT pattern. Add comments to that effect.
...
llvm-svn: 139205
2011-09-06 23:43:26 +00:00
Owen Anderson
653cb03191
Teach BasicAA about the aliasing properties of memset_pattern16.
...
Fixes PR10872 and <rdar://problem/10065079>.
llvm-svn: 139204
2011-09-06 23:33:25 +00:00
Fariborz Jahanian
6dd3f39dae
objc-gc: Adds support for "weak" property attribute under GC.
...
// rdar://10073896
llvm-svn: 139203
2011-09-06 23:32:40 +00:00
Jim Grosbach
5b5c953b07
ISB is HasDB, not just HasV7.
...
llvm-svn: 139202
2011-09-06 23:09:19 +00:00
Enrico Granata
855cd9012c
Refactoring of Get() methods in FormatManager/FormatCategory to have explicative names and return shared-pointers instead of bools
...
Reduced the amount of memory required to avoid loops in DumpPrintableRepresentation() from 32 bits down to 1 bit
- Additionally, disallowed creating summary strings of the form ${var%S} which did nothing but cause endless loops by definition
llvm-svn: 139201
2011-09-06 22:59:55 +00:00
Jim Grosbach
83a6188f18
Thumb2 parsing and encoding for ISB.
...
llvm-svn: 139200
2011-09-06 22:53:27 +00:00
Jim Grosbach
958feffa11
Thumb2 parsing and encoding for EOR.
...
llvm-svn: 139199
2011-09-06 22:44:50 +00:00
Johnny Chen
11309a39ea
Fill out implementation of Enable/DisableWatchpoint() for ProcessGDBRemote class (Not Tested Yet).
...
Also update the signature of WatchpointLocation::SetEnable() to take a bool as input arg.
llvm-svn: 139198
2011-09-06 22:38:36 +00:00
Chandler Carruth
cf57ebfd4c
Remove the doxyment for this now defunct parameter.
...
llvm-svn: 139197
2011-09-06 22:34:36 +00:00
Chandler Carruth
935574de2f
Don't recompute the presumed loc twice in 5 lines of code... Spotted by
...
inspection.
llvm-svn: 139196
2011-09-06 22:34:33 +00:00
Chandler Carruth
1f28e6c7e3
Use ArrayRef for the fixit hint array rather than a pointer and a size.
...
Clean up loops over the hints to use the more idiomatic iterator form in
LLVM and Clang.
llvm-svn: 139195
2011-09-06 22:31:44 +00:00
Jim Grosbach
ed9399995a
Thumb2 parsing and encoding for DSB.
...
llvm-svn: 139194
2011-09-06 22:19:40 +00:00
Jim Grosbach
e95f46384e
Thumb2 parsing and encoding for DMB.
...
llvm-svn: 139193
2011-09-06 22:14:58 +00:00
Nick Lewycky
474c455060
Disable these tests harder. They're XFAIL'd, but that means they still run, and
...
these tests all infinitely recurse, bringing my system down into swapping hell.
llvm-svn: 139192
2011-09-06 22:08:18 +00:00
Jim Grosbach
c048b905b4
Thumb2 parsing and encoding for DBG.
...
llvm-svn: 139191
2011-09-06 22:06:40 +00:00
Chandler Carruth
20bfaa0f68
Hoist the construction of the FixItHint line into a member function with
...
a defined interface. This isn't as nice as the previous one, but should
get better as I push through better data types in all these functions.
Also, I'm hoping to pull some aspects of this out into a common routine
(such as tab expansion).
Again, WIP, comments welcome as I'm going through.
llvm-svn: 139190
2011-09-06 22:01:04 +00:00
Jim Grosbach
565e2f5752
Thumb2 parsing and encoding for CMN and CMP.
...
llvm-svn: 139188
2011-09-06 21:44:58 +00:00
Richard Trieu
b80728fe9a
Rename variables in SemaExpr.cpp to give a more consistant naming scheme.
...
ExprResult LHS, RHS,
Expr *LHSExpr, *RHSExpr
QualType LHSType, RHSType
Functions changed:
CheckCompareOperands()
llvm-svn: 139187
2011-09-06 21:43:51 +00:00
Nick Lewycky
e0aa54bb98
This transform only handles two-operand AddRec's. Prevent it from trying to
...
handle anything more complex. Fixes PR10383 again!
llvm-svn: 139186
2011-09-06 21:42:18 +00:00
Douglas Gregor
e0e9630e07
When extracting the callee declaration from a call expression, be sure
...
to look through SubstNonTypeTemplateParmExprs. Then, update the IR
generation of CallExprs to actually use CallExpr::getCalleeDecl()
rather than attempting to mimick its behavior (badly).
Fixes <rdar://problem/10063539>.
llvm-svn: 139185
2011-09-06 21:41:04 +00:00
Richard Trieu
1762d7cc35
Rename variables in SemaExpr.cpp to give a more consistant naming scheme.
...
ExprResult LHS, RHS,
Expr *LHSExpr, *RHSExpr
QualType LHSType, RHSType
Functions changed:
checkEnumComparison()
diagnoseDistinctPointerComparison()
convertPointersToCompositeType()
diagnoseFunctionPointerToVoidComparison()
llvm-svn: 139184
2011-09-06 21:27:33 +00:00
Richard Trieu
e4a19fbd0c
Rename variables in SemaExpr.cpp to give a more consistant naming scheme.
...
ExprResult LHS, RHS,
Expr *LHSExpr, *RHSExpr
QualType LHSType, RHSType
Functions changed:
DiagnoseBadShiftValues()
CheckShiftOperands()
llvm-svn: 139183
2011-09-06 21:21:28 +00:00
Richard Trieu
4ae7e97667
Rename variables in SemaExpr.cpp to give a more consistant naming scheme.
...
ExprResult LHS, RHS,
Expr *LHSExpr, *RHSExpr
QualType LHSType, RHSType
Functions changed:
diagnoseArithmeticOnTwoVoidPointers()
checkArithmeticBinOpPointerOperands()
diagnosePointerIncompatibility()
CheckAdditionOperands()
CheckSubtractionOperands()
llvm-svn: 139182
2011-09-06 21:13:51 +00:00
Richard Trieu
859d23fa5e
Rename variables in SemaExpr.cpp to give a more consistant naming scheme.
...
ExprResult LHS, RHS,
Expr *LHSExpr, *RHSExpr
QualType LHSType, RHSType
Functions changed:
CheckVectorOperands()
CheckMultiplyDivideOperands()
CheckRemainderOperands()
llvm-svn: 139181
2011-09-06 21:01:04 +00:00
Ted Kremenek
99c0966fc4
Place 'equality comparison with extraneous parentheses...' into a subgroup of -Wparentheses called -Wparentheses-equality.
...
llvm-svn: 139180
2011-09-06 20:58:32 +00:00
Eli Friedman
fc4b343dda
Add mayLoad/mayStore markings to ARM 64-bit atomic pseudo-instructions.
...
llvm-svn: 139179
2011-09-06 20:53:37 +00:00
Douglas Gregor
49695f078e
Implement the Named Return Value Optimization (NRVO) for blocks.
...
llvm-svn: 139178
2011-09-06 20:46:03 +00:00
Jim Grosbach
70532e289f
Thumb2 parsing and encoding for CLZ.
...
llvm-svn: 139177
2011-09-06 20:44:17 +00:00
Richard Trieu
eb29914c5d
Rename variables in SemaExpr.cpp to give a more consistant naming scheme.
...
ExprResult LHS, RHS,
Expr *LHSExpr, *RHSExpr
QualType LHSType, RHSType
Functions changed:
CheckTransparentUnionArgumentConstraints()
CheckSingleAssignmentConstraints()
InvalidOperands()
llvm-svn: 139176
2011-09-06 20:40:12 +00:00