llvm-project/clang/lib/ARCMigrate
Alp Toker 29cb66ba2f Enforce safe usage of DiagnosticsEngine::getCustomDiagID()
Replace the last incorrect uses and templatize the function to require a
compile-time constant string preventing further misuse.

The diagnostic formatter expects well-formed input and has undefined behaviour
with arbitrary input or crafted user strings in source files. Accepting user
input would also have caused unbounded generation of new diagnostic IDs which
can be problematic in long-running sessions or language bindings.

This completes the work to fix several incorrect callers that passed user
input or raw messages to the diagnostics engine where a constant format string
was expected.

llvm-svn: 200132
2014-01-26 06:17:37 +00:00
..
ARCMT.cpp ARCMigrate: Introduce proper diagnostics for TransformActions 2014-01-26 05:07:32 +00:00
ARCMTActions.cpp Extract the (InputKind, std::string) pair used to describe inputs to 2012-01-20 16:28:04 +00:00
CMakeLists.txt [CMake] clang/lib: Prune redundant dependencies. 2013-12-10 02:36:22 +00:00
FileRemapper.cpp Enforce safe usage of DiagnosticsEngine::getCustomDiagID() 2014-01-26 06:17:37 +00:00
Internals.h ARCMigrate: Introduce proper diagnostics for TransformActions 2014-01-26 05:07:32 +00:00
Makefile
ObjCMT.cpp Enforce safe usage of DiagnosticsEngine::getCustomDiagID() 2014-01-26 06:17:37 +00:00
PlistReporter.cpp PlistSupport: Eliminate duplicated EmitLocation() and EmitRange() functions 2014-01-25 14:38:41 +00:00
TransAPIUses.cpp ARCMigrate: Introduce proper diagnostics for TransformActions 2014-01-26 05:07:32 +00:00
TransARCAssign.cpp s/tranform/transform/ 2012-11-14 15:08:31 +00:00
TransAutoreleasePool.cpp Sort all of Clang's files under 'lib', and fix up the broken headers 2012-12-04 09:13:33 +00:00
TransBlockObjCVariable.cpp Pull the Attr iteration parts out of Attr.h, so including DeclBase.h doesn't pull in all the generated Attr code. 2012-12-01 15:09:41 +00:00
TransEmptyStatementsAndDealloc.cpp s/tranform/transform/ 2012-11-14 15:08:31 +00:00
TransGCAttrs.cpp Replace TypeLoc llvm::cast support to be well-defined. 2013-02-18 22:06:02 +00:00
TransGCCalls.cpp ARCMigrate: Introduce proper diagnostics for TransformActions 2014-01-26 05:07:32 +00:00
TransProperties.cpp Rework the traversal of Objective-C categories and extensions to 2013-01-16 23:00:23 +00:00
TransProtectedScope.cpp [arcmt] Copy the diagnostics so we don't have to worry about invaliding iterators from the diagnostic list. 2013-04-01 21:12:30 +00:00
TransRetainReleaseDealloc.cpp Point diagnostics that complain about a use of a selector in an objc message, to the selector location. 2013-05-01 00:24:09 +00:00
TransUnbridgedCasts.cpp Replacing calls to getAttr with calls to hasAttr for clarity. No functional change intended -- this only replaces Boolean uses of getAttr. 2013-12-19 02:39:40 +00:00
TransUnusedInitDelegate.cpp s/tranform/transform/ 2012-11-14 15:08:31 +00:00
TransZeroOutPropsInDealloc.cpp s/tranform/transform/ 2012-11-14 15:08:31 +00:00
TransformActions.cpp ARCMigrate: Introduce proper diagnostics for TransformActions 2014-01-26 05:07:32 +00:00
Transforms.cpp Replacing calls to getAttr with calls to hasAttr for clarity. No functional change intended -- this only replaces Boolean uses of getAttr. 2013-12-19 02:39:40 +00:00
Transforms.h ObjectiveC migrator: fixes a bug when in NS_ENUM/NS_OPTIONS 2013-10-11 17:35:22 +00:00