blob: 3ded735f592b41a25a653138cca4851fcc70d265 [file] [log] [blame]
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +00001//=- AnalysisBasedWarnings.cpp - Sema warnings based on libAnalysis -*- C++ -*-=//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file defines analysis_warnings::[Policy,Executor].
11// Together they are used by Sema to issue warnings based on inexpensive
12// static analysis algorithms in libAnalysis.
13//
14//===----------------------------------------------------------------------===//
15
Douglas Gregore737f502010-08-12 20:07:10 +000016#include "clang/Sema/AnalysisBasedWarnings.h"
John McCall2d887082010-08-25 22:03:47 +000017#include "clang/Sema/SemaInternal.h"
Ted Kremenekd068aab2010-03-20 21:11:09 +000018#include "clang/Basic/SourceManager.h"
John McCall7cd088e2010-08-24 07:21:54 +000019#include "clang/AST/DeclObjC.h"
John McCall384aff82010-08-25 07:42:41 +000020#include "clang/AST/DeclCXX.h"
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +000021#include "clang/AST/ExprObjC.h"
22#include "clang/AST/ExprCXX.h"
23#include "clang/AST/StmtObjC.h"
24#include "clang/AST/StmtCXX.h"
25#include "clang/Analysis/AnalysisContext.h"
26#include "clang/Analysis/CFG.h"
27#include "clang/Analysis/Analyses/ReachableCode.h"
Ted Kremenek610068c2011-01-15 02:58:47 +000028#include "clang/Analysis/Analyses/UninitializedValuesV2.h"
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +000029#include "llvm/ADT/BitVector.h"
30#include "llvm/Support/Casting.h"
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +000031
32using namespace clang;
33
34//===----------------------------------------------------------------------===//
35// Unreachable code analysis.
36//===----------------------------------------------------------------------===//
37
38namespace {
39 class UnreachableCodeHandler : public reachable_code::Callback {
40 Sema &S;
41 public:
42 UnreachableCodeHandler(Sema &s) : S(s) {}
43
44 void HandleUnreachable(SourceLocation L, SourceRange R1, SourceRange R2) {
45 S.Diag(L, diag::warn_unreachable) << R1 << R2;
46 }
47 };
48}
49
50/// CheckUnreachable - Check for unreachable code.
51static void CheckUnreachable(Sema &S, AnalysisContext &AC) {
52 UnreachableCodeHandler UC(S);
53 reachable_code::FindUnreachableCode(AC, UC);
54}
55
56//===----------------------------------------------------------------------===//
57// Check for missing return value.
58//===----------------------------------------------------------------------===//
59
John McCall16565aa2010-05-16 09:34:11 +000060enum ControlFlowKind {
61 UnknownFallThrough,
62 NeverFallThrough,
63 MaybeFallThrough,
64 AlwaysFallThrough,
65 NeverFallThroughOrReturn
66};
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +000067
68/// CheckFallThrough - Check that we don't fall off the end of a
69/// Statement that should return a value.
70///
71/// \returns AlwaysFallThrough iff we always fall off the end of the statement,
72/// MaybeFallThrough iff we might or might not fall off the end,
73/// NeverFallThroughOrReturn iff we never fall off the end of the statement or
74/// return. We assume NeverFallThrough iff we never fall off the end of the
75/// statement but we may return. We assume that functions not marked noreturn
76/// will return.
77static ControlFlowKind CheckFallThrough(AnalysisContext &AC) {
78 CFG *cfg = AC.getCFG();
John McCall16565aa2010-05-16 09:34:11 +000079 if (cfg == 0) return UnknownFallThrough;
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +000080
81 // The CFG leaves in dead things, and we don't want the dead code paths to
82 // confuse us, so we mark all live things first.
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +000083 llvm::BitVector live(cfg->getNumBlockIDs());
84 unsigned count = reachable_code::ScanReachableFromBlock(cfg->getEntry(),
85 live);
86
87 bool AddEHEdges = AC.getAddEHEdges();
88 if (!AddEHEdges && count != cfg->getNumBlockIDs())
89 // When there are things remaining dead, and we didn't add EH edges
90 // from CallExprs to the catch clauses, we have to go back and
91 // mark them as live.
92 for (CFG::iterator I = cfg->begin(), E = cfg->end(); I != E; ++I) {
93 CFGBlock &b = **I;
94 if (!live[b.getBlockID()]) {
95 if (b.pred_begin() == b.pred_end()) {
96 if (b.getTerminator() && isa<CXXTryStmt>(b.getTerminator()))
97 // When not adding EH edges from calls, catch clauses
98 // can otherwise seem dead. Avoid noting them as dead.
99 count += reachable_code::ScanReachableFromBlock(b, live);
100 continue;
101 }
102 }
103 }
104
105 // Now we know what is live, we check the live precessors of the exit block
106 // and look for fall through paths, being careful to ignore normal returns,
107 // and exceptional paths.
108 bool HasLiveReturn = false;
109 bool HasFakeEdge = false;
110 bool HasPlainEdge = false;
111 bool HasAbnormalEdge = false;
Ted Kremenek90b828a2010-09-09 00:06:07 +0000112
113 // Ignore default cases that aren't likely to be reachable because all
114 // enums in a switch(X) have explicit case statements.
115 CFGBlock::FilterOptions FO;
116 FO.IgnoreDefaultsWithCoveredEnums = 1;
117
118 for (CFGBlock::filtered_pred_iterator
119 I = cfg->getExit().filtered_pred_start_end(FO); I.hasMore(); ++I) {
120 const CFGBlock& B = **I;
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +0000121 if (!live[B.getBlockID()])
122 continue;
123 if (B.size() == 0) {
124 if (B.getTerminator() && isa<CXXTryStmt>(B.getTerminator())) {
125 HasAbnormalEdge = true;
126 continue;
127 }
128
129 // A labeled empty statement, or the entry block...
130 HasPlainEdge = true;
131 continue;
132 }
Zhongxing Xub36cd3e2010-09-16 01:25:47 +0000133 CFGElement CE = B[B.size()-1];
Anders Carlsson0dc5f9a2011-01-16 22:12:43 +0000134 if (CFGInitializer CI = CE.getAs<CFGInitializer>()) {
135 // A base or member initializer.
136 HasPlainEdge = true;
137 continue;
138 }
139
Zhongxing Xub36cd3e2010-09-16 01:25:47 +0000140 CFGStmt CS = CE.getAs<CFGStmt>();
141 if (!CS.isValid())
142 continue;
143 Stmt *S = CS.getStmt();
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +0000144 if (isa<ReturnStmt>(S)) {
145 HasLiveReturn = true;
146 continue;
147 }
148 if (isa<ObjCAtThrowStmt>(S)) {
149 HasFakeEdge = true;
150 continue;
151 }
152 if (isa<CXXThrowExpr>(S)) {
153 HasFakeEdge = true;
154 continue;
155 }
156 if (const AsmStmt *AS = dyn_cast<AsmStmt>(S)) {
157 if (AS->isMSAsm()) {
158 HasFakeEdge = true;
159 HasLiveReturn = true;
160 continue;
161 }
162 }
163 if (isa<CXXTryStmt>(S)) {
164 HasAbnormalEdge = true;
165 continue;
166 }
167
168 bool NoReturnEdge = false;
169 if (CallExpr *C = dyn_cast<CallExpr>(S)) {
John McCall259d48e2010-04-30 07:10:06 +0000170 if (std::find(B.succ_begin(), B.succ_end(), &cfg->getExit())
171 == B.succ_end()) {
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +0000172 HasAbnormalEdge = true;
173 continue;
174 }
175 Expr *CEE = C->getCallee()->IgnoreParenCasts();
Rafael Espindola264ba482010-03-30 20:24:48 +0000176 if (getFunctionExtInfo(CEE->getType()).getNoReturn()) {
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +0000177 NoReturnEdge = true;
178 HasFakeEdge = true;
179 } else if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(CEE)) {
180 ValueDecl *VD = DRE->getDecl();
181 if (VD->hasAttr<NoReturnAttr>()) {
182 NoReturnEdge = true;
183 HasFakeEdge = true;
184 }
185 }
186 }
187 // FIXME: Add noreturn message sends.
188 if (NoReturnEdge == false)
189 HasPlainEdge = true;
190 }
191 if (!HasPlainEdge) {
192 if (HasLiveReturn)
193 return NeverFallThrough;
194 return NeverFallThroughOrReturn;
195 }
196 if (HasAbnormalEdge || HasFakeEdge || HasLiveReturn)
197 return MaybeFallThrough;
198 // This says AlwaysFallThrough for calls to functions that are not marked
199 // noreturn, that don't return. If people would like this warning to be more
200 // accurate, such functions should be marked as noreturn.
201 return AlwaysFallThrough;
202}
203
Dan Gohman3c46e8d2010-07-26 21:25:24 +0000204namespace {
205
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +0000206struct CheckFallThroughDiagnostics {
207 unsigned diag_MaybeFallThrough_HasNoReturn;
208 unsigned diag_MaybeFallThrough_ReturnsNonVoid;
209 unsigned diag_AlwaysFallThrough_HasNoReturn;
210 unsigned diag_AlwaysFallThrough_ReturnsNonVoid;
211 unsigned diag_NeverFallThroughOrReturn;
212 bool funMode;
Argyrios Kyrtzidis08274082010-12-15 18:44:22 +0000213 SourceLocation FuncLoc;
Ted Kremenekd064fdc2010-03-23 00:13:23 +0000214
Douglas Gregorca7eaee2010-04-16 23:28:44 +0000215 static CheckFallThroughDiagnostics MakeForFunction(const Decl *Func) {
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +0000216 CheckFallThroughDiagnostics D;
Argyrios Kyrtzidis08274082010-12-15 18:44:22 +0000217 D.FuncLoc = Func->getLocation();
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +0000218 D.diag_MaybeFallThrough_HasNoReturn =
219 diag::warn_falloff_noreturn_function;
220 D.diag_MaybeFallThrough_ReturnsNonVoid =
221 diag::warn_maybe_falloff_nonvoid_function;
222 D.diag_AlwaysFallThrough_HasNoReturn =
223 diag::warn_falloff_noreturn_function;
224 D.diag_AlwaysFallThrough_ReturnsNonVoid =
225 diag::warn_falloff_nonvoid_function;
Douglas Gregorca7eaee2010-04-16 23:28:44 +0000226
227 // Don't suggest that virtual functions be marked "noreturn", since they
228 // might be overridden by non-noreturn functions.
229 bool isVirtualMethod = false;
230 if (const CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(Func))
231 isVirtualMethod = Method->isVirtual();
232
233 if (!isVirtualMethod)
234 D.diag_NeverFallThroughOrReturn =
235 diag::warn_suggest_noreturn_function;
236 else
237 D.diag_NeverFallThroughOrReturn = 0;
238
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +0000239 D.funMode = true;
240 return D;
241 }
Ted Kremenekd064fdc2010-03-23 00:13:23 +0000242
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +0000243 static CheckFallThroughDiagnostics MakeForBlock() {
244 CheckFallThroughDiagnostics D;
245 D.diag_MaybeFallThrough_HasNoReturn =
246 diag::err_noreturn_block_has_return_expr;
247 D.diag_MaybeFallThrough_ReturnsNonVoid =
248 diag::err_maybe_falloff_nonvoid_block;
249 D.diag_AlwaysFallThrough_HasNoReturn =
250 diag::err_noreturn_block_has_return_expr;
251 D.diag_AlwaysFallThrough_ReturnsNonVoid =
252 diag::err_falloff_nonvoid_block;
253 D.diag_NeverFallThroughOrReturn =
254 diag::warn_suggest_noreturn_block;
255 D.funMode = false;
256 return D;
257 }
Ted Kremenekd064fdc2010-03-23 00:13:23 +0000258
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +0000259 bool checkDiagnostics(Diagnostic &D, bool ReturnsVoid,
260 bool HasNoReturn) const {
261 if (funMode) {
Argyrios Kyrtzidis08274082010-12-15 18:44:22 +0000262 return (ReturnsVoid ||
263 D.getDiagnosticLevel(diag::warn_maybe_falloff_nonvoid_function,
264 FuncLoc) == Diagnostic::Ignored)
265 && (!HasNoReturn ||
266 D.getDiagnosticLevel(diag::warn_noreturn_function_has_return_expr,
267 FuncLoc) == Diagnostic::Ignored)
268 && (!ReturnsVoid ||
269 D.getDiagnosticLevel(diag::warn_suggest_noreturn_block, FuncLoc)
270 == Diagnostic::Ignored);
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +0000271 }
Ted Kremenekd064fdc2010-03-23 00:13:23 +0000272
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +0000273 // For blocks.
274 return ReturnsVoid && !HasNoReturn
Argyrios Kyrtzidis08274082010-12-15 18:44:22 +0000275 && (!ReturnsVoid ||
276 D.getDiagnosticLevel(diag::warn_suggest_noreturn_block, FuncLoc)
277 == Diagnostic::Ignored);
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +0000278 }
279};
280
Dan Gohman3c46e8d2010-07-26 21:25:24 +0000281}
282
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +0000283/// CheckFallThroughForFunctionDef - Check that we don't fall off the end of a
284/// function that should return a value. Check that we don't fall off the end
285/// of a noreturn function. We assume that functions and blocks not marked
286/// noreturn will return.
287static void CheckFallThroughForBody(Sema &S, const Decl *D, const Stmt *Body,
288 QualType BlockTy,
289 const CheckFallThroughDiagnostics& CD,
290 AnalysisContext &AC) {
291
292 bool ReturnsVoid = false;
293 bool HasNoReturn = false;
294
295 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
296 ReturnsVoid = FD->getResultType()->isVoidType();
297 HasNoReturn = FD->hasAttr<NoReturnAttr>() ||
Rafael Espindola264ba482010-03-30 20:24:48 +0000298 FD->getType()->getAs<FunctionType>()->getNoReturnAttr();
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +0000299 }
300 else if (const ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(D)) {
301 ReturnsVoid = MD->getResultType()->isVoidType();
302 HasNoReturn = MD->hasAttr<NoReturnAttr>();
303 }
304 else if (isa<BlockDecl>(D)) {
Ted Kremenekd064fdc2010-03-23 00:13:23 +0000305 if (const FunctionType *FT =
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +0000306 BlockTy->getPointeeType()->getAs<FunctionType>()) {
307 if (FT->getResultType()->isVoidType())
308 ReturnsVoid = true;
309 if (FT->getNoReturnAttr())
310 HasNoReturn = true;
311 }
312 }
313
314 Diagnostic &Diags = S.getDiagnostics();
315
316 // Short circuit for compilation speed.
317 if (CD.checkDiagnostics(Diags, ReturnsVoid, HasNoReturn))
318 return;
Ted Kremenekd064fdc2010-03-23 00:13:23 +0000319
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +0000320 // FIXME: Function try block
321 if (const CompoundStmt *Compound = dyn_cast<CompoundStmt>(Body)) {
322 switch (CheckFallThrough(AC)) {
John McCall16565aa2010-05-16 09:34:11 +0000323 case UnknownFallThrough:
324 break;
325
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +0000326 case MaybeFallThrough:
327 if (HasNoReturn)
328 S.Diag(Compound->getRBracLoc(),
329 CD.diag_MaybeFallThrough_HasNoReturn);
330 else if (!ReturnsVoid)
331 S.Diag(Compound->getRBracLoc(),
332 CD.diag_MaybeFallThrough_ReturnsNonVoid);
333 break;
334 case AlwaysFallThrough:
335 if (HasNoReturn)
336 S.Diag(Compound->getRBracLoc(),
337 CD.diag_AlwaysFallThrough_HasNoReturn);
338 else if (!ReturnsVoid)
339 S.Diag(Compound->getRBracLoc(),
340 CD.diag_AlwaysFallThrough_ReturnsNonVoid);
341 break;
342 case NeverFallThroughOrReturn:
Douglas Gregorca7eaee2010-04-16 23:28:44 +0000343 if (ReturnsVoid && !HasNoReturn && CD.diag_NeverFallThroughOrReturn)
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +0000344 S.Diag(Compound->getLBracLoc(),
345 CD.diag_NeverFallThroughOrReturn);
346 break;
347 case NeverFallThrough:
348 break;
349 }
350 }
351}
352
353//===----------------------------------------------------------------------===//
Ted Kremenek610068c2011-01-15 02:58:47 +0000354// -Wuninitialized
355//===----------------------------------------------------------------------===//
356
357namespace {
358class UninitValsDiagReporter : public UninitVariablesHandler {
359 Sema &S;
360public:
361 UninitValsDiagReporter(Sema &S) : S(S) {}
362
363 void handleUseOfUninitVariable(const DeclRefExpr *dr, const VarDecl *vd) {
364 S.Diag(dr->getLocStart(), diag::warn_var_is_uninit)
365 << vd->getDeclName() << dr->getSourceRange();
366 }
367};
368}
369
370//===----------------------------------------------------------------------===//
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +0000371// AnalysisBasedWarnings - Worker object used by Sema to execute analysis-based
372// warnings on a function, method, or block.
373//===----------------------------------------------------------------------===//
374
Ted Kremenekd064fdc2010-03-23 00:13:23 +0000375clang::sema::AnalysisBasedWarnings::Policy::Policy() {
376 enableCheckFallThrough = 1;
377 enableCheckUnreachable = 0;
378}
379
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +0000380clang::sema::AnalysisBasedWarnings::AnalysisBasedWarnings(Sema &s) : S(s) {
381 Diagnostic &D = S.getDiagnostics();
Ted Kremenekd064fdc2010-03-23 00:13:23 +0000382 DefaultPolicy.enableCheckUnreachable = (unsigned)
Argyrios Kyrtzidis08274082010-12-15 18:44:22 +0000383 (D.getDiagnosticLevel(diag::warn_unreachable, SourceLocation()) !=
384 Diagnostic::Ignored);
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +0000385}
386
Ted Kremenekd064fdc2010-03-23 00:13:23 +0000387void clang::sema::
388AnalysisBasedWarnings::IssueWarnings(sema::AnalysisBasedWarnings::Policy P,
Ted Kremenekb7e5f142010-04-08 18:51:44 +0000389 const Decl *D, QualType BlockTy) {
Ted Kremenekd064fdc2010-03-23 00:13:23 +0000390
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +0000391 assert(BlockTy.isNull() || isa<BlockDecl>(D));
Ted Kremenekd068aab2010-03-20 21:11:09 +0000392
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +0000393 // We avoid doing analysis-based warnings when there are errors for
394 // two reasons:
395 // (1) The CFGs often can't be constructed (if the body is invalid), so
396 // don't bother trying.
397 // (2) The code already has problems; running the analysis just takes more
398 // time.
Ted Kremenek99e81922010-04-30 21:49:25 +0000399 Diagnostic &Diags = S.getDiagnostics();
400
401 if (Diags.hasErrorOccurred() || Diags.hasFatalErrorOccurred())
Ted Kremenekd064fdc2010-03-23 00:13:23 +0000402 return;
403
404 // Do not do any analysis for declarations in system headers if we are
405 // going to just ignore them.
Ted Kremenek99e81922010-04-30 21:49:25 +0000406 if (Diags.getSuppressSystemWarnings() &&
Ted Kremenekd064fdc2010-03-23 00:13:23 +0000407 S.SourceMgr.isInSystemHeader(D->getLocation()))
408 return;
409
John McCalle0054f62010-08-25 05:56:39 +0000410 // For code in dependent contexts, we'll do this at instantiation time.
411 if (cast<DeclContext>(D)->isDependentContext())
412 return;
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +0000413
414 const Stmt *Body = D->getBody();
415 assert(Body);
416
417 // Don't generate EH edges for CallExprs as we'd like to avoid the n^2
418 // explosion for destrutors that can result and the compile time hit.
Chandler Carrutheeef9242011-01-08 06:54:40 +0000419 AnalysisContext AC(D, 0, /*useUnoptimizedCFG=*/false, /*addehedges=*/false,
420 /*addImplicitDtors=*/true, /*addInitializers=*/true);
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +0000421
422 // Warning: check missing 'return'
Ted Kremenekd064fdc2010-03-23 00:13:23 +0000423 if (P.enableCheckFallThrough) {
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +0000424 const CheckFallThroughDiagnostics &CD =
425 (isa<BlockDecl>(D) ? CheckFallThroughDiagnostics::MakeForBlock()
Douglas Gregorca7eaee2010-04-16 23:28:44 +0000426 : CheckFallThroughDiagnostics::MakeForFunction(D));
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +0000427 CheckFallThroughForBody(S, D, Body, BlockTy, CD, AC);
428 }
429
430 // Warning: check for unreachable code
Ted Kremenekb7e5f142010-04-08 18:51:44 +0000431 if (P.enableCheckUnreachable)
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +0000432 CheckUnreachable(S, AC);
Ted Kremenek610068c2011-01-15 02:58:47 +0000433
434 if (Diags.getDiagnosticLevel(diag::warn_var_is_uninit, D->getLocStart())
435 != Diagnostic::Ignored) {
436 if (!S.getLangOptions().CPlusPlus) {
437 CFG *cfg = AC.getCFG();
438 if (cfg) {
439 UninitValsDiagReporter reporter(S);
440 runUninitializedVariablesAnalysis(*cast<DeclContext>(D), *cfg,
441 reporter);
442 }
443 }
444 }
Ted Kremenekdbdbaaf2010-03-20 21:06:02 +0000445}
John McCalle0054f62010-08-25 05:56:39 +0000446
447void clang::sema::
448AnalysisBasedWarnings::IssueWarnings(sema::AnalysisBasedWarnings::Policy P,
449 const BlockExpr *E) {
450 return IssueWarnings(P, E->getBlockDecl(), E->getType());
451}
452
453void clang::sema::
454AnalysisBasedWarnings::IssueWarnings(sema::AnalysisBasedWarnings::Policy P,
455 const ObjCMethodDecl *D) {
456 return IssueWarnings(P, D, QualType());
457}
458
459void clang::sema::
460AnalysisBasedWarnings::IssueWarnings(sema::AnalysisBasedWarnings::Policy P,
461 const FunctionDecl *D) {
462 return IssueWarnings(P, D, QualType());
463}