Avoid superfluous errors regarding variable-length arrays (casts).

llvm-svn: 55759
This commit is contained in:
Daniel Dunbar
2008-09-04 03:43:08 +00:00
parent 8cde00a510
commit f2cf6d16e6
5 changed files with 23 additions and 9 deletions

View File

@@ -67,7 +67,10 @@ void CodeGenModule::Release() {
/// ErrorUnsupported - Print out an error that codegen doesn't support the
/// specified stmt yet.
void CodeGenModule::ErrorUnsupported(const Stmt *S, const char *Type) {
void CodeGenModule::ErrorUnsupported(const Stmt *S, const char *Type,
bool OmitOnError) {
if (OmitOnError && getDiags().hasErrorOccurred())
return;
unsigned DiagID = getDiags().getCustomDiagID(Diagnostic::Error,
"cannot codegen this %0 yet");
SourceRange Range = S->getSourceRange();
@@ -78,7 +81,10 @@ void CodeGenModule::ErrorUnsupported(const Stmt *S, const char *Type) {
/// ErrorUnsupported - Print out an error that codegen doesn't support the
/// specified decl yet.
void CodeGenModule::ErrorUnsupported(const Decl *D, const char *Type) {
void CodeGenModule::ErrorUnsupported(const Decl *D, const char *Type,
bool OmitOnError) {
if (OmitOnError && getDiags().hasErrorOccurred())
return;
unsigned DiagID = getDiags().getCustomDiagID(Diagnostic::Error,
"cannot codegen this %0 yet");
std::string Msg = Type;