Coverage Report

Created: 2021-08-24 07:12

/Users/buildslave/jenkins/workspace/coverage/llvm-project/clang/include/clang/Basic/Diagnostic.h
Line
Count
Source (jump to first uncovered line)
1
//===- Diagnostic.h - C Language Family Diagnostic Handling -----*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
/// \file
10
/// Defines the Diagnostic-related interfaces.
11
//
12
//===----------------------------------------------------------------------===//
13
14
#ifndef LLVM_CLANG_BASIC_DIAGNOSTIC_H
15
#define LLVM_CLANG_BASIC_DIAGNOSTIC_H
16
17
#include "clang/Basic/DiagnosticIDs.h"
18
#include "clang/Basic/DiagnosticOptions.h"
19
#include "clang/Basic/SourceLocation.h"
20
#include "clang/Basic/Specifiers.h"
21
#include "llvm/ADT/ArrayRef.h"
22
#include "llvm/ADT/DenseMap.h"
23
#include "llvm/ADT/IntrusiveRefCntPtr.h"
24
#include "llvm/ADT/Optional.h"
25
#include "llvm/ADT/SmallVector.h"
26
#include "llvm/ADT/StringRef.h"
27
#include "llvm/ADT/iterator_range.h"
28
#include "llvm/Support/Compiler.h"
29
#include <cassert>
30
#include <cstdint>
31
#include <limits>
32
#include <list>
33
#include <map>
34
#include <memory>
35
#include <string>
36
#include <type_traits>
37
#include <utility>
38
#include <vector>
39
40
namespace llvm {
41
class Error;
42
}
43
44
namespace clang {
45
46
class DeclContext;
47
class DiagnosticBuilder;
48
class DiagnosticConsumer;
49
class IdentifierInfo;
50
class LangOptions;
51
class Preprocessor;
52
class SourceManager;
53
class StoredDiagnostic;
54
55
namespace tok {
56
57
enum TokenKind : unsigned short;
58
59
} // namespace tok
60
61
/// Annotates a diagnostic with some code that should be
62
/// inserted, removed, or replaced to fix the problem.
63
///
64
/// This kind of hint should be used when we are certain that the
65
/// introduction, removal, or modification of a particular (small!)
66
/// amount of code will correct a compilation error. The compiler
67
/// should also provide full recovery from such errors, such that
68
/// suppressing the diagnostic output can still result in successful
69
/// compilation.
70
class FixItHint {
71
public:
72
  /// Code that should be replaced to correct the error. Empty for an
73
  /// insertion hint.
74
  CharSourceRange RemoveRange;
75
76
  /// Code in the specific range that should be inserted in the insertion
77
  /// location.
78
  CharSourceRange InsertFromRange;
79
80
  /// The actual code to insert at the insertion location, as a
81
  /// string.
82
  std::string CodeToInsert;
83
84
  bool BeforePreviousInsertions = false;
85
86
  /// Empty code modification hint, indicating that no code
87
  /// modification is known.
88
545k
  FixItHint() = default;
89
90
539k
  bool isNull() const {
91
539k
    return !RemoveRange.isValid();
92
539k
  }
93
94
  /// Create a code modification hint that inserts the given
95
  /// code string at a specific location.
96
  static FixItHint CreateInsertion(SourceLocation InsertionLoc,
97
                                   StringRef Code,
98
419k
                                   bool BeforePreviousInsertions = false) {
99
419k
    FixItHint Hint;
100
419k
    Hint.RemoveRange =
101
419k
      CharSourceRange::getCharRange(InsertionLoc, InsertionLoc);
102
419k
    Hint.CodeToInsert = std::string(Code);
103
419k
    Hint.BeforePreviousInsertions = BeforePreviousInsertions;
104
419k
    return Hint;
105
419k
  }
106
107
  /// Create a code modification hint that inserts the given
108
  /// code from \p FromRange at a specific location.
109
  static FixItHint CreateInsertionFromRange(SourceLocation InsertionLoc,
110
                                            CharSourceRange FromRange,
111
118
                                        bool BeforePreviousInsertions = false) {
112
118
    FixItHint Hint;
113
118
    Hint.RemoveRange =
114
118
      CharSourceRange::getCharRange(InsertionLoc, InsertionLoc);
115
118
    Hint.InsertFromRange = FromRange;
116
118
    Hint.BeforePreviousInsertions = BeforePreviousInsertions;
117
118
    return Hint;
118
118
  }
119
120
  /// Create a code modification hint that removes the given
121
  /// source range.
122
42.6k
  static FixItHint CreateRemoval(CharSourceRange RemoveRange) {
123
42.6k
    FixItHint Hint;
124
42.6k
    Hint.RemoveRange = RemoveRange;
125
42.6k
    return Hint;
126
42.6k
  }
127
42.0k
  static FixItHint CreateRemoval(SourceRange RemoveRange) {
128
42.0k
    return CreateRemoval(CharSourceRange::getTokenRange(RemoveRange));
129
42.0k
  }
130
131
  /// Create a code modification hint that replaces the given
132
  /// source range with the given code string.
133
  static FixItHint CreateReplacement(CharSourceRange RemoveRange,
134
34.6k
                                     StringRef Code) {
135
34.6k
    FixItHint Hint;
136
34.6k
    Hint.RemoveRange = RemoveRange;
137
34.6k
    Hint.CodeToInsert = std::string(Code);
138
34.6k
    return Hint;
139
34.6k
  }
140
141
  static FixItHint CreateReplacement(SourceRange RemoveRange,
142
10.2k
                                     StringRef Code) {
143
10.2k
    return CreateReplacement(CharSourceRange::getTokenRange(RemoveRange), Code);
144
10.2k
  }
145
};
146
147
struct DiagnosticStorage {
148
  enum {
149
    /// The maximum number of arguments we can hold. We
150
    /// currently only support up to 10 arguments (%0-%9).
151
    ///
152
    /// A single diagnostic with more than that almost certainly has to
153
    /// be simplified anyway.
154
    MaxArguments = 10
155
  };
156
157
  /// The number of entries in Arguments.
158
  unsigned char NumDiagArgs = 0;
159
160
  /// Specifies for each argument whether it is in DiagArgumentsStr
161
  /// or in DiagArguments.
162
  unsigned char DiagArgumentsKind[MaxArguments];
163
164
  /// The values for the various substitution positions.
165
  ///
166
  /// This is used when the argument is not an std::string. The specific value
167
  /// is mangled into an intptr_t and the interpretation depends on exactly
168
  /// what sort of argument kind it is.
169
  intptr_t DiagArgumentsVal[MaxArguments];
170
171
  /// The values for the various substitution positions that have
172
  /// string arguments.
173
  std::string DiagArgumentsStr[MaxArguments];
174
175
  /// The list of ranges added to this diagnostic.
176
  SmallVector<CharSourceRange, 8> DiagRanges;
177
178
  /// If valid, provides a hint with some code to insert, remove, or
179
  /// modify at a particular position.
180
  SmallVector<FixItHint, 6> FixItHints;
181
182
2.05M
  DiagnosticStorage() = default;
183
};
184
185
/// Concrete class used by the front-end to report problems and issues.
186
///
187
/// This massages the diagnostics (e.g. handling things like "report warnings
188
/// as errors" and passes them off to the DiagnosticConsumer for reporting to
189
/// the user. DiagnosticsEngine is tied to one translation unit and one
190
/// SourceManager.
191
class DiagnosticsEngine : public RefCountedBase<DiagnosticsEngine> {
192
public:
193
  /// The level of the diagnostic, after it has been through mapping.
194
  enum Level {
195
    Ignored = DiagnosticIDs::Ignored,
196
    Note = DiagnosticIDs::Note,
197
    Remark = DiagnosticIDs::Remark,
198
    Warning = DiagnosticIDs::Warning,
199
    Error = DiagnosticIDs::Error,
200
    Fatal = DiagnosticIDs::Fatal
201
  };
202
203
  enum ArgumentKind {
204
    /// std::string
205
    ak_std_string,
206
207
    /// const char *
208
    ak_c_string,
209
210
    /// int
211
    ak_sint,
212
213
    /// unsigned
214
    ak_uint,
215
216
    /// enum TokenKind : unsigned
217
    ak_tokenkind,
218
219
    /// IdentifierInfo
220
    ak_identifierinfo,
221
222
    /// address space
223
    ak_addrspace,
224
225
    /// Qualifiers
226
    ak_qual,
227
228
    /// QualType
229
    ak_qualtype,
230
231
    /// DeclarationName
232
    ak_declarationname,
233
234
    /// NamedDecl *
235
    ak_nameddecl,
236
237
    /// NestedNameSpecifier *
238
    ak_nestednamespec,
239
240
    /// DeclContext *
241
    ak_declcontext,
242
243
    /// pair<QualType, QualType>
244
    ak_qualtype_pair,
245
246
    /// Attr *
247
    ak_attr
248
  };
249
250
  /// Represents on argument value, which is a union discriminated
251
  /// by ArgumentKind, with a value.
252
  using ArgumentValue = std::pair<ArgumentKind, intptr_t>;
253
254
private:
255
  // Used by __extension__
256
  unsigned char AllExtensionsSilenced = 0;
257
258
  // Treat fatal errors like errors.
259
  bool FatalsAsError = false;
260
261
  // Suppress all diagnostics.
262
  bool SuppressAllDiagnostics = false;
263
264
  // Elide common types of templates.
265
  bool ElideType = true;
266
267
  // Print a tree when comparing templates.
268
  bool PrintTemplateTree = false;
269
270
  // Color printing is enabled.
271
  bool ShowColors = false;
272
273
  // Which overload candidates to show.
274
  OverloadsShown ShowOverloads = Ovl_All;
275
276
  // With Ovl_Best, the number of overload candidates to show when we encounter
277
  // an error.
278
  //
279
  // The value here is the number of candidates to show in the first nontrivial
280
  // error.  Future errors may show a different number of candidates.
281
  unsigned NumOverloadsToShow = 32;
282
283
  // Cap of # errors emitted, 0 -> no limit.
284
  unsigned ErrorLimit = 0;
285
286
  // Cap on depth of template backtrace stack, 0 -> no limit.
287
  unsigned TemplateBacktraceLimit = 0;
288
289
  // Cap on depth of constexpr evaluation backtrace stack, 0 -> no limit.
290
  unsigned ConstexprBacktraceLimit = 0;
291
292
  IntrusiveRefCntPtr<DiagnosticIDs> Diags;
293
  IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts;
294
  DiagnosticConsumer *Client = nullptr;
295
  std::unique_ptr<DiagnosticConsumer> Owner;
296
  SourceManager *SourceMgr = nullptr;
297
298
  /// Mapping information for diagnostics.
299
  ///
300
  /// Mapping info is packed into four bits per diagnostic.  The low three
301
  /// bits are the mapping (an instance of diag::Severity), or zero if unset.
302
  /// The high bit is set when the mapping was established as a user mapping.
303
  /// If the high bit is clear, then the low bits are set to the default
304
  /// value, and should be mapped with -pedantic, -Werror, etc.
305
  ///
306
  /// A new DiagState is created and kept around when diagnostic pragmas modify
307
  /// the state so that we know what is the diagnostic state at any given
308
  /// source location.
309
  class DiagState {
310
    llvm::DenseMap<unsigned, DiagnosticMapping> DiagMap;
311
312
  public:
313
    // "Global" configuration state that can actually vary between modules.
314
315
    // Ignore all warnings: -w
316
    unsigned IgnoreAllWarnings : 1;
317
318
    // Enable all warnings.
319
    unsigned EnableAllWarnings : 1;
320
321
    // Treat warnings like errors.
322
    unsigned WarningsAsErrors : 1;
323
324
    // Treat errors like fatal errors.
325
    unsigned ErrorsAsFatal : 1;
326
327
    // Suppress warnings in system headers.
328
    unsigned SuppressSystemWarnings : 1;
329
330
    // Map extensions to warnings or errors?
331
    diag::Severity ExtBehavior = diag::Severity::Ignored;
332
333
    DiagState()
334
        : IgnoreAllWarnings(false), EnableAllWarnings(false),
335
          WarningsAsErrors(false), ErrorsAsFatal(false),
336
405k
          SuppressSystemWarnings(false) {}
337
338
    using iterator = llvm::DenseMap<unsigned, DiagnosticMapping>::iterator;
339
    using const_iterator =
340
        llvm::DenseMap<unsigned, DiagnosticMapping>::const_iterator;
341
342
3.32M
    void setMapping(diag::kind Diag, DiagnosticMapping Info) {
343
3.32M
      DiagMap[Diag] = Info;
344
3.32M
    }
345
346
0
    DiagnosticMapping lookupMapping(diag::kind Diag) const {
347
0
      return DiagMap.lookup(Diag);
348
0
    }
349
350
    DiagnosticMapping &getOrAddMapping(diag::kind Diag);
351
352
11.7k
    const_iterator begin() const { return DiagMap.begin(); }
353
11.7k
    const_iterator end() const { return DiagMap.end(); }
354
  };
355
356
  /// Keeps and automatically disposes all DiagStates that we create.
357
  std::list<DiagState> DiagStates;
358
359
  /// A mapping from files to the diagnostic states for those files. Lazily
360
  /// built on demand for files in which the diagnostic state has not changed.
361
  class DiagStateMap {
362
  public:
363
    /// Add an initial diagnostic state.
364
    void appendFirst(DiagState *State);
365
366
    /// Add a new latest state point.
367
    void append(SourceManager &SrcMgr, SourceLocation Loc, DiagState *State);
368
369
    /// Look up the diagnostic state at a given source location.
370
    DiagState *lookup(SourceManager &SrcMgr, SourceLocation Loc) const;
371
372
    /// Determine whether this map is empty.
373
242k
    bool empty() const { return Files.empty(); }
374
375
    /// Clear out this map.
376
404k
    void clear() {
377
404k
      Files.clear();
378
404k
      FirstDiagState = CurDiagState = nullptr;
379
404k
      CurDiagStateLoc = SourceLocation();
380
404k
    }
381
382
    /// Produce a debugging dump of the diagnostic state.
383
    LLVM_DUMP_METHOD void dump(SourceManager &SrcMgr,
384
                               StringRef DiagName = StringRef()) const;
385
386
    /// Grab the most-recently-added state point.
387
29.6M
    DiagState *getCurDiagState() const { return CurDiagState; }
388
389
    /// Get the location at which a diagnostic state was last added.
390
1.19M
    SourceLocation getCurDiagStateLoc() const { return CurDiagStateLoc; }
391
392
  private:
393
    friend class ASTReader;
394
    friend class ASTWriter;
395
396
    /// Represents a point in source where the diagnostic state was
397
    /// modified because of a pragma.
398
    ///
399
    /// 'Loc' can be null if the point represents the diagnostic state
400
    /// modifications done through the command-line.
401
    struct DiagStatePoint {
402
      DiagState *State;
403
      unsigned Offset;
404
405
      DiagStatePoint(DiagState *State, unsigned Offset)
406
3.84M
          : State(State), Offset(Offset) {}
407
    };
408
409
    /// Description of the diagnostic states and state transitions for a
410
    /// particular FileID.
411
    struct File {
412
      /// The diagnostic state for the parent file. This is strictly redundant,
413
      /// as looking up the DecomposedIncludedLoc for the FileID in the Files
414
      /// map would give us this, but we cache it here for performance.
415
      File *Parent = nullptr;
416
417
      /// The offset of this file within its parent.
418
      unsigned ParentOffset = 0;
419
420
      /// Whether this file has any local (not imported from an AST file)
421
      /// diagnostic state transitions.
422
      bool HasLocalTransitions = false;
423
424
      /// The points within the file where the state changes. There will always
425
      /// be at least one of these (the state on entry to the file).
426
      llvm::SmallVector<DiagStatePoint, 4> StateTransitions;
427
428
      DiagState *lookup(unsigned Offset) const;
429
    };
430
431
    /// The diagnostic states for each file.
432
    mutable std::map<FileID, File> Files;
433
434
    /// The initial diagnostic state.
435
    DiagState *FirstDiagState;
436
437
    /// The current diagnostic state.
438
    DiagState *CurDiagState;
439
440
    /// The location at which the current diagnostic state was established.
441
    SourceLocation CurDiagStateLoc;
442
443
    /// Get the diagnostic state information for a file.
444
    File *getFile(SourceManager &SrcMgr, FileID ID) const;
445
  };
446
447
  DiagStateMap DiagStatesByLoc;
448
449
  /// Keeps the DiagState that was active during each diagnostic 'push'
450
  /// so we can get back at it when we 'pop'.
451
  std::vector<DiagState *> DiagStateOnPushStack;
452
453
23.0M
  DiagState *GetCurDiagState() const {
454
23.0M
    return DiagStatesByLoc.getCurDiagState();
455
23.0M
  }
456
457
  void PushDiagStatePoint(DiagState *State, SourceLocation L);
458
459
  /// Finds the DiagStatePoint that contains the diagnostic state of
460
  /// the given source location.
461
193M
  DiagState *GetDiagStateForLoc(SourceLocation Loc) const {
462
193M
    return SourceMgr ? 
DiagStatesByLoc.lookup(*SourceMgr, Loc)193M
463
193M
                     : 
DiagStatesByLoc.getCurDiagState()129k
;
464
193M
  }
465
466
  /// Sticky flag set to \c true when an error is emitted.
467
  bool ErrorOccurred;
468
469
  /// Sticky flag set to \c true when an "uncompilable error" occurs.
470
  /// I.e. an error that was not upgraded from a warning by -Werror.
471
  bool UncompilableErrorOccurred;
472
473
  /// Sticky flag set to \c true when a fatal error is emitted.
474
  bool FatalErrorOccurred;
475
476
  /// Indicates that an unrecoverable error has occurred.
477
  bool UnrecoverableErrorOccurred;
478
479
  /// Counts for DiagnosticErrorTrap to check whether an error occurred
480
  /// during a parsing section, e.g. during parsing a function.
481
  unsigned TrapNumErrorsOccurred;
482
  unsigned TrapNumUnrecoverableErrorsOccurred;
483
484
  /// The level of the last diagnostic emitted.
485
  ///
486
  /// This is used to emit continuation diagnostics with the same level as the
487
  /// diagnostic that they follow.
488
  DiagnosticIDs::Level LastDiagLevel;
489
490
  /// Number of warnings reported
491
  unsigned NumWarnings;
492
493
  /// Number of errors reported
494
  unsigned NumErrors;
495
496
  /// A function pointer that converts an opaque diagnostic
497
  /// argument to a strings.
498
  ///
499
  /// This takes the modifiers and argument that was present in the diagnostic.
500
  ///
501
  /// The PrevArgs array indicates the previous arguments formatted for this
502
  /// diagnostic.  Implementations of this function can use this information to
503
  /// avoid redundancy across arguments.
504
  ///
505
  /// This is a hack to avoid a layering violation between libbasic and libsema.
506
  using ArgToStringFnTy = void (*)(
507
      ArgumentKind Kind, intptr_t Val,
508
      StringRef Modifier, StringRef Argument,
509
      ArrayRef<ArgumentValue> PrevArgs,
510
      SmallVectorImpl<char> &Output,
511
      void *Cookie,
512
      ArrayRef<intptr_t> QualTypeVals);
513
514
  void *ArgToStringCookie = nullptr;
515
  ArgToStringFnTy ArgToStringFn;
516
517
  /// ID of the "delayed" diagnostic, which is a (typically
518
  /// fatal) diagnostic that had to be delayed because it was found
519
  /// while emitting another diagnostic.
520
  unsigned DelayedDiagID;
521
522
  /// First string argument for the delayed diagnostic.
523
  std::string DelayedDiagArg1;
524
525
  /// Second string argument for the delayed diagnostic.
526
  std::string DelayedDiagArg2;
527
528
  /// Third string argument for the delayed diagnostic.
529
  std::string DelayedDiagArg3;
530
531
  /// Optional flag value.
532
  ///
533
  /// Some flags accept values, for instance: -Wframe-larger-than=<value> and
534
  /// -Rpass=<value>. The content of this string is emitted after the flag name
535
  /// and '='.
536
  std::string FlagValue;
537
538
public:
539
  explicit DiagnosticsEngine(IntrusiveRefCntPtr<DiagnosticIDs> Diags,
540
                             IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts,
541
                             DiagnosticConsumer *client = nullptr,
542
                             bool ShouldOwnClient = true);
543
  DiagnosticsEngine(const DiagnosticsEngine &) = delete;
544
  DiagnosticsEngine &operator=(const DiagnosticsEngine &) = delete;
545
  ~DiagnosticsEngine();
546
547
  LLVM_DUMP_METHOD void dump() const;
548
  LLVM_DUMP_METHOD void dump(StringRef DiagName) const;
549
550
3.67M
  const IntrusiveRefCntPtr<DiagnosticIDs> &getDiagnosticIDs() const {
551
3.67M
    return Diags;
552
3.67M
  }
553
554
  /// Retrieve the diagnostic options.
555
22.1M
  DiagnosticOptions &getDiagnosticOptions() const { return *DiagOpts; }
556
557
  using diag_mapping_range = llvm::iterator_range<DiagState::const_iterator>;
558
559
  /// Get the current set of diagnostic mappings.
560
3.47k
  diag_mapping_range getDiagnosticMappings() const {
561
3.47k
    const DiagState &DS = *GetCurDiagState();
562
3.47k
    return diag_mapping_range(DS.begin(), DS.end());
563
3.47k
  }
564
565
14.5M
  DiagnosticConsumer *getClient() { return Client; }
566
0
  const DiagnosticConsumer *getClient() const { return Client; }
567
568
  /// Determine whether this \c DiagnosticsEngine object own its client.
569
17.3k
  bool ownsClient() const { return Owner != nullptr; }
570
571
  /// Return the current diagnostic client along with ownership of that
572
  /// client.
573
54.0k
  std::unique_ptr<DiagnosticConsumer> takeClient() { return std::move(Owner); }
574
575
432k
  bool hasSourceManager() const { return SourceMgr != nullptr; }
576
577
21.1M
  SourceManager &getSourceManager() const {
578
21.1M
    assert(SourceMgr && "SourceManager not set!");
579
0
    return *SourceMgr;
580
21.1M
  }
581
582
242k
  void setSourceManager(SourceManager *SrcMgr) {
583
242k
    assert(DiagStatesByLoc.empty() &&
584
242k
           "Leftover diag state from a different SourceManager.");
585
0
    SourceMgr = SrcMgr;
586
242k
  }
587
588
  //===--------------------------------------------------------------------===//
589
  //  DiagnosticsEngine characterization methods, used by a client to customize
590
  //  how diagnostics are emitted.
591
  //
592
593
  /// Copies the current DiagMappings and pushes the new copy
594
  /// onto the top of the stack.
595
  void pushMappings(SourceLocation Loc);
596
597
  /// Pops the current DiagMappings off the top of the stack,
598
  /// causing the new top of the stack to be the active mappings.
599
  ///
600
  /// \returns \c true if the pop happens, \c false if there is only one
601
  /// DiagMapping on the stack.
602
  bool popMappings(SourceLocation Loc);
603
604
  /// Set the diagnostic client associated with this diagnostic object.
605
  ///
606
  /// \param ShouldOwnClient true if the diagnostic object should take
607
  /// ownership of \c client.
608
  void setClient(DiagnosticConsumer *client, bool ShouldOwnClient = true);
609
610
  /// Specify a limit for the number of errors we should
611
  /// emit before giving up.
612
  ///
613
  /// Zero disables the limit.
614
66.5k
  void setErrorLimit(unsigned Limit) { ErrorLimit = Limit; }
615
616
  /// Specify the maximum number of template instantiation
617
  /// notes to emit along with a given diagnostic.
618
128k
  void setTemplateBacktraceLimit(unsigned Limit) {
619
128k
    TemplateBacktraceLimit = Limit;
620
128k
  }
621
622
  /// Retrieve the maximum number of template instantiation
623
  /// notes to emit along with a given diagnostic.
624
5.85k
  unsigned getTemplateBacktraceLimit() const {
625
5.85k
    return TemplateBacktraceLimit;
626
5.85k
  }
627
628
  /// Specify the maximum number of constexpr evaluation
629
  /// notes to emit along with a given diagnostic.
630
128k
  void setConstexprBacktraceLimit(unsigned Limit) {
631
128k
    ConstexprBacktraceLimit = Limit;
632
128k
  }
633
634
  /// Retrieve the maximum number of constexpr evaluation
635
  /// notes to emit along with a given diagnostic.
636
760k
  unsigned getConstexprBacktraceLimit() const {
637
760k
    return ConstexprBacktraceLimit;
638
760k
  }
639
640
  /// When set to true, any unmapped warnings are ignored.
641
  ///
642
  /// If this and WarningsAsErrors are both set, then this one wins.
643
175k
  void setIgnoreAllWarnings(bool Val) {
644
175k
    GetCurDiagState()->IgnoreAllWarnings = Val;
645
175k
  }
646
3.20M
  bool getIgnoreAllWarnings() const {
647
3.20M
    return GetCurDiagState()->IgnoreAllWarnings;
648
3.20M
  }
649
650
  /// When set to true, any unmapped ignored warnings are no longer
651
  /// ignored.
652
  ///
653
  /// If this and IgnoreAllWarnings are both set, then that one wins.
654
48
  void setEnableAllWarnings(bool Val) {
655
48
    GetCurDiagState()->EnableAllWarnings = Val;
656
48
  }
657
43
  bool getEnableAllWarnings() const {
658
43
    return GetCurDiagState()->EnableAllWarnings;
659
43
  }
660
661
  /// When set to true, any warnings reported are issued as errors.
662
4.30k
  void setWarningsAsErrors(bool Val) {
663
4.30k
    GetCurDiagState()->WarningsAsErrors = Val;
664
4.30k
  }
665
3.54k
  bool getWarningsAsErrors() const {
666
3.54k
    return GetCurDiagState()->WarningsAsErrors;
667
3.54k
  }
668
669
  /// When set to true, any error reported is made a fatal error.
670
2
  void setErrorsAsFatal(bool Val) { GetCurDiagState()->ErrorsAsFatal = Val; }
671
0
  bool getErrorsAsFatal() const { return GetCurDiagState()->ErrorsAsFatal; }
672
673
  /// \brief When set to true, any fatal error reported is made an error.
674
  ///
675
  /// This setting takes precedence over the setErrorsAsFatal setting above.
676
7
  void setFatalsAsError(bool Val) { FatalsAsError = Val; }
677
0
  bool getFatalsAsError() const { return FatalsAsError; }
678
679
  /// When set to true mask warnings that come from system headers.
680
128k
  void setSuppressSystemWarnings(bool Val) {
681
128k
    GetCurDiagState()->SuppressSystemWarnings = Val;
682
128k
  }
683
18.7M
  bool getSuppressSystemWarnings() const {
684
18.7M
    return GetCurDiagState()->SuppressSystemWarnings;
685
18.7M
  }
686
687
  /// Suppress all diagnostics, to silence the front end when we
688
  /// know that we don't want any more diagnostics to be passed along to the
689
  /// client
690
1.38k
  void setSuppressAllDiagnostics(bool Val) { SuppressAllDiagnostics = Val; }
691
3.63M
  bool getSuppressAllDiagnostics() const { return SuppressAllDiagnostics; }
692
693
  /// Set type eliding, to skip outputting same types occurring in
694
  /// template types.
695
128k
  void setElideType(bool Val) { ElideType = Val; }
696
0
  bool getElideType() { return ElideType; }
697
698
  /// Set tree printing, to outputting the template difference in a
699
  /// tree format.
700
128k
  void setPrintTemplateTree(bool Val) { PrintTemplateTree = Val; }
701
0
  bool getPrintTemplateTree() { return PrintTemplateTree; }
702
703
  /// Set color printing, so the type diffing will inject color markers
704
  /// into the output.
705
128k
  void setShowColors(bool Val) { ShowColors = Val; }
706
1.51k
  bool getShowColors() { return ShowColors; }
707
708
  /// Specify which overload candidates to show when overload resolution
709
  /// fails.
710
  ///
711
  /// By default, we show all candidates.
712
128k
  void setShowOverloads(OverloadsShown Val) {
713
128k
    ShowOverloads = Val;
714
128k
  }
715
38.2k
  OverloadsShown getShowOverloads() const { return ShowOverloads; }
716
717
  /// When a call or operator fails, print out up to this many candidate
718
  /// overloads as suggestions.
719
  ///
720
  /// With Ovl_Best, we set a high limit for the first nontrivial overload set
721
  /// we print, and a lower limit for later sets.  This way the user has a
722
  /// chance of diagnosing at least one callsite in their program without
723
  /// having to recompile with -fshow-overloads=all.
724
19.5k
  unsigned getNumOverloadCandidatesToShow() const {
725
19.5k
    switch (getShowOverloads()) {
726
19.5k
    case Ovl_All:
727
      // INT_MAX rather than UINT_MAX so that we don't have to think about the
728
      // effect of implicit conversions on this value. In practice we'll never
729
      // hit 2^31 candidates anyway.
730
19.5k
      return std::numeric_limits<int>::max();
731
74
    case Ovl_Best:
732
74
      return NumOverloadsToShow;
733
19.5k
    }
734
0
    llvm_unreachable("invalid OverloadsShown kind");
735
0
  }
736
737
  /// Call this after showing N overload candidates.  This influences the value
738
  /// returned by later calls to getNumOverloadCandidatesToShow().
739
18.7k
  void overloadCandidatesShown(unsigned N) {
740
    // Current heuristic: Start out with a large value for NumOverloadsToShow,
741
    // and then once we print one nontrivially-large overload set, decrease it
742
    // for future calls.
743
18.7k
    if (N > 4) {
744
670
      NumOverloadsToShow = 4;
745
670
    }
746
18.7k
  }
747
748
  /// Pretend that the last diagnostic issued was ignored, so any
749
  /// subsequent notes will be suppressed, or restore a prior ignoring
750
  /// state after ignoring some diagnostics and their notes, possibly in
751
  /// the middle of another diagnostic.
752
  ///
753
  /// This can be used by clients who suppress diagnostics themselves.
754
2.33M
  void setLastDiagnosticIgnored(bool Ignored) {
755
2.33M
    if (LastDiagLevel == DiagnosticIDs::Fatal)
756
8
      FatalErrorOccurred = true;
757
2.33M
    LastDiagLevel = Ignored ? 
DiagnosticIDs::Ignored2.12M
:
DiagnosticIDs::Warning202k
;
758
2.33M
  }
759
760
  /// Determine whether the previous diagnostic was ignored. This can
761
  /// be used by clients that want to determine whether notes attached to a
762
  /// diagnostic will be suppressed.
763
2.18M
  bool isLastDiagnosticIgnored() const {
764
2.18M
    return LastDiagLevel == DiagnosticIDs::Ignored;
765
2.18M
  }
766
767
  /// Controls whether otherwise-unmapped extension diagnostics are
768
  /// mapped onto ignore/warning/error.
769
  ///
770
  /// This corresponds to the GCC -pedantic and -pedantic-errors option.
771
128k
  void setExtensionHandlingBehavior(diag::Severity H) {
772
128k
    GetCurDiagState()->ExtBehavior = H;
773
128k
  }
774
8.99k
  diag::Severity getExtensionHandlingBehavior() const {
775
8.99k
    return GetCurDiagState()->ExtBehavior;
776
8.99k
  }
777
778
  /// Counter bumped when an __extension__  block is/ encountered.
779
  ///
780
  /// When non-zero, all extension diagnostics are entirely silenced, no
781
  /// matter how they are mapped.
782
34.1k
  void IncrementAllExtensionsSilenced() { ++AllExtensionsSilenced; }
783
34.1k
  void DecrementAllExtensionsSilenced() { --AllExtensionsSilenced; }
784
153M
  bool hasAllExtensionsSilenced() { return AllExtensionsSilenced != 0; }
785
786
  /// This allows the client to specify that certain warnings are
787
  /// ignored.
788
  ///
789
  /// Notes can never be mapped, errors can only be mapped to fatal, and
790
  /// WARNINGs and EXTENSIONs can be mapped arbitrarily.
791
  ///
792
  /// \param Loc The source location that this change of diagnostic state should
793
  /// take affect. It can be null if we are setting the latest state.
794
  void setSeverity(diag::kind Diag, diag::Severity Map, SourceLocation Loc);
795
796
  /// Change an entire diagnostic group (e.g. "unknown-pragmas") to
797
  /// have the specified mapping.
798
  ///
799
  /// \returns true (and ignores the request) if "Group" was unknown, false
800
  /// otherwise.
801
  ///
802
  /// \param Flavor The flavor of group to affect. -Rfoo does not affect the
803
  /// state of the -Wfoo group and vice versa.
804
  ///
805
  /// \param Loc The source location that this change of diagnostic state should
806
  /// take affect. It can be null if we are setting the state from command-line.
807
  bool setSeverityForGroup(diag::Flavor Flavor, StringRef Group,
808
                           diag::Severity Map,
809
                           SourceLocation Loc = SourceLocation());
810
811
  /// Set the warning-as-error flag for the given diagnostic group.
812
  ///
813
  /// This function always only operates on the current diagnostic state.
814
  ///
815
  /// \returns True if the given group is unknown, false otherwise.
816
  bool setDiagnosticGroupWarningAsError(StringRef Group, bool Enabled);
817
818
  /// Set the error-as-fatal flag for the given diagnostic group.
819
  ///
820
  /// This function always only operates on the current diagnostic state.
821
  ///
822
  /// \returns True if the given group is unknown, false otherwise.
823
  bool setDiagnosticGroupErrorAsFatal(StringRef Group, bool Enabled);
824
825
  /// Add the specified mapping to all diagnostics of the specified
826
  /// flavor.
827
  ///
828
  /// Mainly to be used by -Wno-everything to disable all warnings but allow
829
  /// subsequent -W options to enable specific warnings.
830
  void setSeverityForAll(diag::Flavor Flavor, diag::Severity Map,
831
                         SourceLocation Loc = SourceLocation());
832
833
26.7M
  bool hasErrorOccurred() const { return ErrorOccurred; }
834
835
  /// Errors that actually prevent compilation, not those that are
836
  /// upgraded from a warning by -Werror.
837
11.5M
  bool hasUncompilableErrorOccurred() const {
838
11.5M
    return UncompilableErrorOccurred;
839
11.5M
  }
840
6.34M
  bool hasFatalErrorOccurred() const { return FatalErrorOccurred; }
841
842
  /// Determine whether any kind of unrecoverable error has occurred.
843
101
  bool hasUnrecoverableErrorOccurred() const {
844
101
    return FatalErrorOccurred || 
UnrecoverableErrorOccurred99
;
845
101
  }
846
847
3.91M
  unsigned getNumErrors() const { return NumErrors; }
848
68.7k
  unsigned getNumWarnings() const { return NumWarnings; }
849
850
492
  void setNumWarnings(unsigned NumWarnings) {
851
492
    this->NumWarnings = NumWarnings;
852
492
  }
853
854
  /// Return an ID for a diagnostic with the specified format string and
855
  /// level.
856
  ///
857
  /// If this is the first request for this diagnostic, it is registered and
858
  /// created, otherwise the existing ID is returned.
859
  ///
860
  /// \param FormatString A fixed diagnostic format string that will be hashed
861
  /// and mapped to a unique DiagID.
862
  template <unsigned N>
863
4.09k
  unsigned getCustomDiagID(Level L, const char (&FormatString)[N]) {
864
4.09k
    return Diags->getCustomDiagID((DiagnosticIDs::Level)L,
865
4.09k
                                  StringRef(FormatString, N - 1));
866
4.09k
  }
unsigned int clang::DiagnosticsEngine::getCustomDiagID<27u>(clang::DiagnosticsEngine::Level, char const (&) [27u])
Line
Count
Source
863
35
  unsigned getCustomDiagID(Level L, const char (&FormatString)[N]) {
864
35
    return Diags->getCustomDiagID((DiagnosticIDs::Level)L,
865
35
                                  StringRef(FormatString, N - 1));
866
35
  }
unsigned int clang::DiagnosticsEngine::getCustomDiagID<37u>(clang::DiagnosticsEngine::Level, char const (&) [37u])
Line
Count
Source
863
2
  unsigned getCustomDiagID(Level L, const char (&FormatString)[N]) {
864
2
    return Diags->getCustomDiagID((DiagnosticIDs::Level)L,
865
2
                                  StringRef(FormatString, N - 1));
866
2
  }
Unexecuted instantiation: unsigned int clang::DiagnosticsEngine::getCustomDiagID<58u>(clang::DiagnosticsEngine::Level, char const (&) [58u])
Unexecuted instantiation: unsigned int clang::DiagnosticsEngine::getCustomDiagID<38u>(clang::DiagnosticsEngine::Level, char const (&) [38u])
Unexecuted instantiation: unsigned int clang::DiagnosticsEngine::getCustomDiagID<63u>(clang::DiagnosticsEngine::Level, char const (&) [63u])
Unexecuted instantiation: unsigned int clang::DiagnosticsEngine::getCustomDiagID<39u>(clang::DiagnosticsEngine::Level, char const (&) [39u])
unsigned int clang::DiagnosticsEngine::getCustomDiagID<50u>(clang::DiagnosticsEngine::Level, char const (&) [50u])
Line
Count
Source
863
2
  unsigned getCustomDiagID(Level L, const char (&FormatString)[N]) {
864
2
    return Diags->getCustomDiagID((DiagnosticIDs::Level)L,
865
2
                                  StringRef(FormatString, N - 1));
866
2
  }
Unexecuted instantiation: unsigned int clang::DiagnosticsEngine::getCustomDiagID<62u>(clang::DiagnosticsEngine::Level, char const (&) [62u])
Unexecuted instantiation: unsigned int clang::DiagnosticsEngine::getCustomDiagID<46u>(clang::DiagnosticsEngine::Level, char const (&) [46u])
unsigned int clang::DiagnosticsEngine::getCustomDiagID<40u>(clang::DiagnosticsEngine::Level, char const (&) [40u])
Line
Count
Source
863
1
  unsigned getCustomDiagID(Level L, const char (&FormatString)[N]) {
864
1
    return Diags->getCustomDiagID((DiagnosticIDs::Level)L,
865
1
                                  StringRef(FormatString, N - 1));
866
1
  }
Unexecuted instantiation: unsigned int clang::DiagnosticsEngine::getCustomDiagID<34u>(clang::DiagnosticsEngine::Level, char const (&) [34u])
Unexecuted instantiation: unsigned int clang::DiagnosticsEngine::getCustomDiagID<35u>(clang::DiagnosticsEngine::Level, char const (&) [35u])
Unexecuted instantiation: unsigned int clang::DiagnosticsEngine::getCustomDiagID<66u>(clang::DiagnosticsEngine::Level, char const (&) [66u])
Unexecuted instantiation: unsigned int clang::DiagnosticsEngine::getCustomDiagID<52u>(clang::DiagnosticsEngine::Level, char const (&) [52u])
Unexecuted instantiation: unsigned int clang::DiagnosticsEngine::getCustomDiagID<44u>(clang::DiagnosticsEngine::Level, char const (&) [44u])
Unexecuted instantiation: unsigned int clang::DiagnosticsEngine::getCustomDiagID<43u>(clang::DiagnosticsEngine::Level, char const (&) [43u])
unsigned int clang::DiagnosticsEngine::getCustomDiagID<60u>(clang::DiagnosticsEngine::Level, char const (&) [60u])
Line
Count
Source
863
2
  unsigned getCustomDiagID(Level L, const char (&FormatString)[N]) {
864
2
    return Diags->getCustomDiagID((DiagnosticIDs::Level)L,
865
2
                                  StringRef(FormatString, N - 1));
866
2
  }
Unexecuted instantiation: unsigned int clang::DiagnosticsEngine::getCustomDiagID<51u>(clang::DiagnosticsEngine::Level, char const (&) [51u])
Unexecuted instantiation: unsigned int clang::DiagnosticsEngine::getCustomDiagID<42u>(clang::DiagnosticsEngine::Level, char const (&) [42u])
Unexecuted instantiation: unsigned int clang::DiagnosticsEngine::getCustomDiagID<36u>(clang::DiagnosticsEngine::Level, char const (&) [36u])
Unexecuted instantiation: unsigned int clang::DiagnosticsEngine::getCustomDiagID<49u>(clang::DiagnosticsEngine::Level, char const (&) [49u])
Unexecuted instantiation: unsigned int clang::DiagnosticsEngine::getCustomDiagID<41u>(clang::DiagnosticsEngine::Level, char const (&) [41u])
unsigned int clang::DiagnosticsEngine::getCustomDiagID<61u>(clang::DiagnosticsEngine::Level, char const (&) [61u])
Line
Count
Source
863
164
  unsigned getCustomDiagID(Level L, const char (&FormatString)[N]) {
864
164
    return Diags->getCustomDiagID((DiagnosticIDs::Level)L,
865
164
                                  StringRef(FormatString, N - 1));
866
164
  }
unsigned int clang::DiagnosticsEngine::getCustomDiagID<20u>(clang::DiagnosticsEngine::Level, char const (&) [20u])
Line
Count
Source
863
2
  unsigned getCustomDiagID(Level L, const char (&FormatString)[N]) {
864
2
    return Diags->getCustomDiagID((DiagnosticIDs::Level)L,
865
2
                                  StringRef(FormatString, N - 1));
866
2
  }
unsigned int clang::DiagnosticsEngine::getCustomDiagID<3u>(clang::DiagnosticsEngine::Level, char const (&) [3u])
Line
Count
Source
863
3.34k
  unsigned getCustomDiagID(Level L, const char (&FormatString)[N]) {
864
3.34k
    return Diags->getCustomDiagID((DiagnosticIDs::Level)L,
865
3.34k
                                  StringRef(FormatString, N - 1));
866
3.34k
  }
Unexecuted instantiation: unsigned int clang::DiagnosticsEngine::getCustomDiagID<47u>(clang::DiagnosticsEngine::Level, char const (&) [47u])
unsigned int clang::DiagnosticsEngine::getCustomDiagID<88u>(clang::DiagnosticsEngine::Level, char const (&) [88u])
Line
Count
Source
863
1
  unsigned getCustomDiagID(Level L, const char (&FormatString)[N]) {
864
1
    return Diags->getCustomDiagID((DiagnosticIDs::Level)L,
865
1
                                  StringRef(FormatString, N - 1));
866
1
  }
unsigned int clang::DiagnosticsEngine::getCustomDiagID<133u>(clang::DiagnosticsEngine::Level, char const (&) [133u])
Line
Count
Source
863
2
  unsigned getCustomDiagID(Level L, const char (&FormatString)[N]) {
864
2
    return Diags->getCustomDiagID((DiagnosticIDs::Level)L,
865
2
                                  StringRef(FormatString, N - 1));
866
2
  }
unsigned int clang::DiagnosticsEngine::getCustomDiagID<104u>(clang::DiagnosticsEngine::Level, char const (&) [104u])
Line
Count
Source
863
1
  unsigned getCustomDiagID(Level L, const char (&FormatString)[N]) {
864
1
    return Diags->getCustomDiagID((DiagnosticIDs::Level)L,
865
1
                                  StringRef(FormatString, N - 1));
866
1
  }
Unexecuted instantiation: unsigned int clang::DiagnosticsEngine::getCustomDiagID<26u>(clang::DiagnosticsEngine::Level, char const (&) [26u])
unsigned int clang::DiagnosticsEngine::getCustomDiagID<54u>(clang::DiagnosticsEngine::Level, char const (&) [54u])
Line
Count
Source
863
250
  unsigned getCustomDiagID(Level L, const char (&FormatString)[N]) {
864
250
    return Diags->getCustomDiagID((DiagnosticIDs::Level)L,
865
250
                                  StringRef(FormatString, N - 1));
866
250
  }
unsigned int clang::DiagnosticsEngine::getCustomDiagID<68u>(clang::DiagnosticsEngine::Level, char const (&) [68u])
Line
Count
Source
863
78
  unsigned getCustomDiagID(Level L, const char (&FormatString)[N]) {
864
78
    return Diags->getCustomDiagID((DiagnosticIDs::Level)L,
865
78
                                  StringRef(FormatString, N - 1));
866
78
  }
unsigned int clang::DiagnosticsEngine::getCustomDiagID<113u>(clang::DiagnosticsEngine::Level, char const (&) [113u])
Line
Count
Source
863
164
  unsigned getCustomDiagID(Level L, const char (&FormatString)[N]) {
864
164
    return Diags->getCustomDiagID((DiagnosticIDs::Level)L,
865
164
                                  StringRef(FormatString, N - 1));
866
164
  }
Unexecuted instantiation: unsigned int clang::DiagnosticsEngine::getCustomDiagID<73u>(clang::DiagnosticsEngine::Level, char const (&) [73u])
unsigned int clang::DiagnosticsEngine::getCustomDiagID<82u>(clang::DiagnosticsEngine::Level, char const (&) [82u])
Line
Count
Source
863
6
  unsigned getCustomDiagID(Level L, const char (&FormatString)[N]) {
864
6
    return Diags->getCustomDiagID((DiagnosticIDs::Level)L,
865
6
                                  StringRef(FormatString, N - 1));
866
6
  }
unsigned int clang::DiagnosticsEngine::getCustomDiagID<141u>(clang::DiagnosticsEngine::Level, char const (&) [141u])
Line
Count
Source
863
22
  unsigned getCustomDiagID(Level L, const char (&FormatString)[N]) {
864
22
    return Diags->getCustomDiagID((DiagnosticIDs::Level)L,
865
22
                                  StringRef(FormatString, N - 1));
866
22
  }
unsigned int clang::DiagnosticsEngine::getCustomDiagID<96u>(clang::DiagnosticsEngine::Level, char const (&) [96u])
Line
Count
Source
863
2
  unsigned getCustomDiagID(Level L, const char (&FormatString)[N]) {
864
2
    return Diags->getCustomDiagID((DiagnosticIDs::Level)L,
865
2
                                  StringRef(FormatString, N - 1));
866
2
  }
Unexecuted instantiation: unsigned int clang::DiagnosticsEngine::getCustomDiagID<86u>(clang::DiagnosticsEngine::Level, char const (&) [86u])
Unexecuted instantiation: unsigned int clang::DiagnosticsEngine::getCustomDiagID<83u>(clang::DiagnosticsEngine::Level, char const (&) [83u])
unsigned int clang::DiagnosticsEngine::getCustomDiagID<30u>(clang::DiagnosticsEngine::Level, char const (&) [30u])
Line
Count
Source
863
1
  unsigned getCustomDiagID(Level L, const char (&FormatString)[N]) {
864
1
    return Diags->getCustomDiagID((DiagnosticIDs::Level)L,
865
1
                                  StringRef(FormatString, N - 1));
866
1
  }
unsigned int clang::DiagnosticsEngine::getCustomDiagID<124u>(clang::DiagnosticsEngine::Level, char const (&) [124u])
Line
Count
Source
863
10
  unsigned getCustomDiagID(Level L, const char (&FormatString)[N]) {
864
10
    return Diags->getCustomDiagID((DiagnosticIDs::Level)L,
865
10
                                  StringRef(FormatString, N - 1));
866
10
  }
unsigned int clang::DiagnosticsEngine::getCustomDiagID<95u>(clang::DiagnosticsEngine::Level, char const (&) [95u])
Line
Count
Source
863
2
  unsigned getCustomDiagID(Level L, const char (&FormatString)[N]) {
864
2
    return Diags->getCustomDiagID((DiagnosticIDs::Level)L,
865
2
                                  StringRef(FormatString, N - 1));
866
2
  }
867
868
  /// Converts a diagnostic argument (as an intptr_t) into the string
869
  /// that represents it.
870
  void ConvertArgToString(ArgumentKind Kind, intptr_t Val,
871
                          StringRef Modifier, StringRef Argument,
872
                          ArrayRef<ArgumentValue> PrevArgs,
873
                          SmallVectorImpl<char> &Output,
874
178k
                          ArrayRef<intptr_t> QualTypeVals) const {
875
178k
    ArgToStringFn(Kind, Val, Modifier, Argument, PrevArgs, Output,
876
178k
                  ArgToStringCookie, QualTypeVals);
877
178k
  }
878
879
94.5k
  void SetArgToStringFn(ArgToStringFnTy Fn, void *Cookie) {
880
94.5k
    ArgToStringFn = Fn;
881
94.5k
    ArgToStringCookie = Cookie;
882
94.5k
  }
883
884
  /// Note that the prior diagnostic was emitted by some other
885
  /// \c DiagnosticsEngine, and we may be attaching a note to that diagnostic.
886
1.23k
  void notePriorDiagnosticFrom(const DiagnosticsEngine &Other) {
887
1.23k
    LastDiagLevel = Other.LastDiagLevel;
888
1.23k
  }
889
890
  /// Reset the state of the diagnostic object to its initial
891
  /// configuration.
892
  void Reset();
893
894
  //===--------------------------------------------------------------------===//
895
  // DiagnosticsEngine classification and reporting interfaces.
896
  //
897
898
  /// Determine whether the diagnostic is known to be ignored.
899
  ///
900
  /// This can be used to opportunistically avoid expensive checks when it's
901
  /// known for certain that the diagnostic has been suppressed at the
902
  /// specified location \p Loc.
903
  ///
904
  /// \param Loc The source location we are interested in finding out the
905
  /// diagnostic state. Can be null in order to query the latest state.
906
184M
  bool isIgnored(unsigned DiagID, SourceLocation Loc) const {
907
184M
    return Diags->getDiagnosticSeverity(DiagID, Loc, *this) ==
908
184M
           diag::Severity::Ignored;
909
184M
  }
910
911
  /// Based on the way the client configured the DiagnosticsEngine
912
  /// object, classify the specified diagnostic ID into a Level, consumable by
913
  /// the DiagnosticConsumer.
914
  ///
915
  /// To preserve invariant assumptions, this function should not be used to
916
  /// influence parse or semantic analysis actions. Instead consider using
917
  /// \c isIgnored().
918
  ///
919
  /// \param Loc The source location we are interested in finding out the
920
  /// diagnostic state. Can be null in order to query the latest state.
921
3.29M
  Level getDiagnosticLevel(unsigned DiagID, SourceLocation Loc) const {
922
3.29M
    return (Level)Diags->getDiagnosticLevel(DiagID, Loc, *this);
923
3.29M
  }
924
925
  /// Issue the message to the client.
926
  ///
927
  /// This actually returns an instance of DiagnosticBuilder which emits the
928
  /// diagnostics (through @c ProcessDiag) when it is destroyed.
929
  ///
930
  /// \param DiagID A member of the @c diag::kind enum.
931
  /// \param Loc Represents the source location associated with the diagnostic,
932
  /// which can be an invalid location if no position information is available.
933
  inline DiagnosticBuilder Report(SourceLocation Loc, unsigned DiagID);
934
  inline DiagnosticBuilder Report(unsigned DiagID);
935
936
  void Report(const StoredDiagnostic &storedDiag);
937
938
  /// Determine whethere there is already a diagnostic in flight.
939
21
  bool isDiagnosticInFlight() const {
940
21
    return CurDiagID != std::numeric_limits<unsigned>::max();
941
21
  }
942
943
  /// Set the "delayed" diagnostic that will be emitted once
944
  /// the current diagnostic completes.
945
  ///
946
  ///  If a diagnostic is already in-flight but the front end must
947
  ///  report a problem (e.g., with an inconsistent file system
948
  ///  state), this routine sets a "delayed" diagnostic that will be
949
  ///  emitted after the current diagnostic completes. This should
950
  ///  only be used for fatal errors detected at inconvenient
951
  ///  times. If emitting a delayed diagnostic causes a second delayed
952
  ///  diagnostic to be introduced, that second delayed diagnostic
953
  ///  will be ignored.
954
  ///
955
  /// \param DiagID The ID of the diagnostic being delayed.
956
  ///
957
  /// \param Arg1 A string argument that will be provided to the
958
  /// diagnostic. A copy of this string will be stored in the
959
  /// DiagnosticsEngine object itself.
960
  ///
961
  /// \param Arg2 A string argument that will be provided to the
962
  /// diagnostic. A copy of this string will be stored in the
963
  /// DiagnosticsEngine object itself.
964
  ///
965
  /// \param Arg3 A string argument that will be provided to the
966
  /// diagnostic. A copy of this string will be stored in the
967
  /// DiagnosticsEngine object itself.
968
  void SetDelayedDiagnostic(unsigned DiagID, StringRef Arg1 = "",
969
                            StringRef Arg2 = "", StringRef Arg3 = "");
970
971
  /// Clear out the current diagnostic.
972
7.12M
  void Clear() { CurDiagID = std::numeric_limits<unsigned>::max(); }
973
974
  /// Return the value associated with this diagnostic flag.
975
11.4k
  StringRef getFlagValue() const { return FlagValue; }
976
977
private:
978
  // This is private state used by DiagnosticBuilder.  We put it here instead of
979
  // in DiagnosticBuilder in order to keep DiagnosticBuilder a small lightweight
980
  // object.  This implementation choice means that we can only have one
981
  // diagnostic "in flight" at a time, but this seems to be a reasonable
982
  // tradeoff to keep these objects small.  Assertions verify that only one
983
  // diagnostic is in flight at a time.
984
  friend class Diagnostic;
985
  friend class DiagnosticBuilder;
986
  friend class DiagnosticErrorTrap;
987
  friend class DiagnosticIDs;
988
  friend class PartialDiagnostic;
989
990
  /// Report the delayed diagnostic.
991
  void ReportDelayed();
992
993
  /// The location of the current diagnostic that is in flight.
994
  SourceLocation CurDiagLoc;
995
996
  /// The ID of the current diagnostic that is in flight.
997
  ///
998
  /// This is set to std::numeric_limits<unsigned>::max() when there is no
999
  /// diagnostic in flight.
1000
  unsigned CurDiagID;
1001
1002
  enum {
1003
    /// The maximum number of arguments we can hold.
1004
    ///
1005
    /// We currently only support up to 10 arguments (%0-%9).  A single
1006
    /// diagnostic with more than that almost certainly has to be simplified
1007
    /// anyway.
1008
    MaxArguments = DiagnosticStorage::MaxArguments,
1009
  };
1010
1011
  DiagnosticStorage DiagStorage;
1012
1013
3.32M
  DiagnosticMapping makeUserMapping(diag::Severity Map, SourceLocation L) {
1014
3.32M
    bool isPragma = L.isValid();
1015
3.32M
    DiagnosticMapping Mapping =
1016
3.32M
        DiagnosticMapping::Make(Map, /*IsUser=*/true, isPragma);
1017
1018
    // If this is a pragma mapping, then set the diagnostic mapping flags so
1019
    // that we override command line options.
1020
3.32M
    if (isPragma) {
1021
1.19M
      Mapping.setNoWarningAsError(true);
1022
1.19M
      Mapping.setNoErrorAsFatal(true);
1023
1.19M
    }
1024
1025
3.32M
    return Mapping;
1026
3.32M
  }
1027
1028
  /// Used to report a diagnostic that is finally fully formed.
1029
  ///
1030
  /// \returns true if the diagnostic was emitted, false if it was suppressed.
1031
6.97M
  bool ProcessDiag() {
1032
6.97M
    return Diags->ProcessDiag(*this);
1033
6.97M
  }
1034
1035
  /// @name Diagnostic Emission
1036
  /// @{
1037
protected:
1038
  friend class ASTReader;
1039
  friend class ASTWriter;
1040
1041
  // Sema requires access to the following functions because the current design
1042
  // of SFINAE requires it to use its own SemaDiagnosticBuilder, which needs to
1043
  // access us directly to ensure we minimize the emitted code for the common
1044
  // Sema::Diag() patterns.
1045
  friend class Sema;
1046
1047
  /// Emit the current diagnostic and clear the diagnostic state.
1048
  ///
1049
  /// \param Force Emit the diagnostic regardless of suppression settings.
1050
  bool EmitCurrentDiagnostic(bool Force = false);
1051
1052
145k
  unsigned getCurrentDiagID() const { return CurDiagID; }
1053
1054
98
  SourceLocation getCurrentDiagLoc() const { return CurDiagLoc; }
1055
1056
  /// @}
1057
};
1058
1059
/// RAII class that determines when any errors have occurred
1060
/// between the time the instance was created and the time it was
1061
/// queried.
1062
///
1063
/// Note that you almost certainly do not want to use this. It's usually
1064
/// meaningless to ask whether a particular scope triggered an error message,
1065
/// because error messages outside that scope can mark things invalid (or cause
1066
/// us to reach an error limit), which can suppress errors within that scope.
1067
class DiagnosticErrorTrap {
1068
  DiagnosticsEngine &Diag;
1069
  unsigned NumErrors;
1070
  unsigned NumUnrecoverableErrors;
1071
1072
public:
1073
  explicit DiagnosticErrorTrap(DiagnosticsEngine &Diag)
1074
1.12M
      : Diag(Diag) { reset(); }
1075
1076
  /// Determine whether any errors have occurred since this
1077
  /// object instance was created.
1078
69
  bool hasErrorOccurred() const {
1079
69
    return Diag.TrapNumErrorsOccurred > NumErrors;
1080
69
  }
1081
1082
  /// Determine whether any unrecoverable errors have occurred since this
1083
  /// object instance was created.
1084
109M
  bool hasUnrecoverableErrorOccurred() const {
1085
109M
    return Diag.TrapNumUnrecoverableErrorsOccurred > NumUnrecoverableErrors;
1086
109M
  }
1087
1088
  /// Set to initial state of "no errors occurred".
1089
47.2M
  void reset() {
1090
47.2M
    NumErrors = Diag.TrapNumErrorsOccurred;
1091
47.2M
    NumUnrecoverableErrors = Diag.TrapNumUnrecoverableErrorsOccurred;
1092
47.2M
  }
1093
};
1094
1095
/// The streaming interface shared between DiagnosticBuilder and
1096
/// PartialDiagnostic. This class is not intended to be constructed directly
1097
/// but only as base class of DiagnosticBuilder and PartialDiagnostic builder.
1098
///
1099
/// Any new type of argument accepted by DiagnosticBuilder and PartialDiagnostic
1100
/// should be implemented as a '<<' operator of StreamingDiagnostic, e.g.
1101
///
1102
/// const StreamingDiagnostic&
1103
/// operator<<(const StreamingDiagnostic&, NewArgType);
1104
///
1105
class StreamingDiagnostic {
1106
public:
1107
  /// An allocator for DiagnosticStorage objects, which uses a small cache to
1108
  /// objects, used to reduce malloc()/free() traffic for partial diagnostics.
1109
  class DiagStorageAllocator {
1110
    static const unsigned NumCached = 16;
1111
    DiagnosticStorage Cached[NumCached];
1112
    DiagnosticStorage *FreeList[NumCached];
1113
    unsigned NumFreeListEntries;
1114
1115
  public:
1116
    DiagStorageAllocator();
1117
    ~DiagStorageAllocator();
1118
1119
    /// Allocate new storage.
1120
1.43M
    DiagnosticStorage *Allocate() {
1121
1.43M
      if (NumFreeListEntries == 0)
1122
19.1k
        return new DiagnosticStorage;
1123
1124
1.41M
      DiagnosticStorage *Result = FreeList[--NumFreeListEntries];
1125
1.41M
      Result->NumDiagArgs = 0;
1126
1.41M
      Result->DiagRanges.clear();
1127
1.41M
      Result->FixItHints.clear();
1128
1.41M
      return Result;
1129
1.43M
    }
1130
1131
    /// Free the given storage object.
1132
1.43M
    void Deallocate(DiagnosticStorage *S) {
1133
1.43M
      if (S >= Cached && 
S <= Cached + NumCached1.41M
) {
1134
1.41M
        FreeList[NumFreeListEntries++] = S;
1135
1.41M
        return;
1136
1.41M
      }
1137
1138
17.4k
      delete S;
1139
17.4k
    }
1140
  };
1141
1142
protected:
1143
  mutable DiagnosticStorage *DiagStorage = nullptr;
1144
1145
  /// Allocator used to allocate storage for this diagnostic.
1146
  DiagStorageAllocator *Allocator = nullptr;
1147
1148
public:
1149
  /// Retrieve storage for this particular diagnostic.
1150
1.43M
  DiagnosticStorage *getStorage() const {
1151
1.43M
    if (DiagStorage)
1152
0
      return DiagStorage;
1153
1154
1.43M
    assert(Allocator);
1155
0
    DiagStorage = Allocator->Allocate();
1156
1.43M
    return DiagStorage;
1157
1.43M
  }
1158
1159
22.2M
  void freeStorage() {
1160
22.2M
    if (!DiagStorage)
1161
7.28M
      return;
1162
1163
    // The hot path for PartialDiagnostic is when we just used it to wrap an ID
1164
    // (typically so we have the flexibility of passing a more complex
1165
    // diagnostic into the callee, but that does not commonly occur).
1166
    //
1167
    // Split this out into a slow function for silly compilers (*cough*) which
1168
    // can't do decent partial inlining.
1169
14.9M
    freeStorageSlow();
1170
14.9M
  }
1171
1172
14.9M
  void freeStorageSlow() {
1173
14.9M
    if (!Allocator)
1174
13.4M
      return;
1175
1.43M
    Allocator->Deallocate(DiagStorage);
1176
1.43M
    DiagStorage = nullptr;
1177
1.43M
  }
1178
1179
4.69M
  void AddTaggedVal(intptr_t V, DiagnosticsEngine::ArgumentKind Kind) const {
1180
4.69M
    if (!DiagStorage)
1181
1.27M
      DiagStorage = getStorage();
1182
1183
4.69M
    assert(DiagStorage->NumDiagArgs < DiagnosticStorage::MaxArguments &&
1184
4.69M
           "Too many arguments to diagnostic!");
1185
0
    DiagStorage->DiagArgumentsKind[DiagStorage->NumDiagArgs] = Kind;
1186
4.69M
    DiagStorage->DiagArgumentsVal[DiagStorage->NumDiagArgs++] = V;
1187
4.69M
  }
1188
1189
605k
  void AddString(StringRef V) const {
1190
605k
    if (!DiagStorage)
1191
58.5k
      DiagStorage = getStorage();
1192
1193
605k
    assert(DiagStorage->NumDiagArgs < DiagnosticStorage::MaxArguments &&
1194
605k
           "Too many arguments to diagnostic!");
1195
0
    DiagStorage->DiagArgumentsKind[DiagStorage->NumDiagArgs] =
1196
605k
        DiagnosticsEngine::ak_std_string;
1197
605k
    DiagStorage->DiagArgumentsStr[DiagStorage->NumDiagArgs++] = std::string(V);
1198
605k
  }
1199
1200
1.71M
  void AddSourceRange(const CharSourceRange &R) const {
1201
1.71M
    if (!DiagStorage)
1202
39.3k
      DiagStorage = getStorage();
1203
1204
1.71M
    DiagStorage->DiagRanges.push_back(R);
1205
1.71M
  }
1206
1207
539k
  void AddFixItHint(const FixItHint &Hint) const {
1208
539k
    if (Hint.isNull())
1209
46.6k
      return;
1210
1211
492k
    if (!DiagStorage)
1212
122
      DiagStorage = getStorage();
1213
1214
492k
    DiagStorage->FixItHints.push_back(Hint);
1215
492k
  }
1216
1217
  /// Conversion of StreamingDiagnostic to bool always returns \c true.
1218
  ///
1219
  /// This allows is to be used in boolean error contexts (where \c true is
1220
  /// used to indicate that an error has occurred), like:
1221
  /// \code
1222
  /// return Diag(...);
1223
  /// \endcode
1224
97
  operator bool() const { return true; }
1225
1226
protected:
1227
10.3M
  StreamingDiagnostic() = default;
1228
1229
  /// Construct with an external storage not owned by itself. The allocator
1230
  /// is a null pointer in this case.
1231
  explicit StreamingDiagnostic(DiagnosticStorage *Storage)
1232
7.12M
      : DiagStorage(Storage) {}
1233
1234
  /// Construct with a storage allocator which will manage the storage. The
1235
  /// allocator is not a null pointer in this case.
1236
  explicit StreamingDiagnostic(DiagStorageAllocator &Alloc)
1237
3.80M
      : Allocator(&Alloc) {}
1238
1239
  StreamingDiagnostic(const StreamingDiagnostic &Diag) = default;
1240
  StreamingDiagnostic(StreamingDiagnostic &&Diag) = default;
1241
1242
21.2M
  ~StreamingDiagnostic() { freeStorage(); }
1243
};
1244
1245
//===----------------------------------------------------------------------===//
1246
// DiagnosticBuilder
1247
//===----------------------------------------------------------------------===//
1248
1249
/// A little helper class used to produce diagnostics.
1250
///
1251
/// This is constructed by the DiagnosticsEngine::Report method, and
1252
/// allows insertion of extra information (arguments and source ranges) into
1253
/// the currently "in flight" diagnostic.  When the temporary for the builder
1254
/// is destroyed, the diagnostic is issued.
1255
///
1256
/// Note that many of these will be created as temporary objects (many call
1257
/// sites), so we want them to be small and we never want their address taken.
1258
/// This ensures that compilers with somewhat reasonable optimizers will promote
1259
/// the common fields to registers, eliminating increments of the NumArgs field,
1260
/// for example.
1261
class DiagnosticBuilder : public StreamingDiagnostic {
1262
  friend class DiagnosticsEngine;
1263
  friend class PartialDiagnostic;
1264
1265
  mutable DiagnosticsEngine *DiagObj = nullptr;
1266
1267
  /// Status variable indicating if this diagnostic is still active.
1268
  ///
1269
  // NOTE: This field is redundant with DiagObj (IsActive iff (DiagObj == 0)),
1270
  // but LLVM is not currently smart enough to eliminate the null check that
1271
  // Emit() would end up with if we used that as our status variable.
1272
  mutable bool IsActive = false;
1273
1274
  /// Flag indicating that this diagnostic is being emitted via a
1275
  /// call to ForceEmit.
1276
  mutable bool IsForceEmit = false;
1277
1278
  DiagnosticBuilder() = default;
1279
1280
  explicit DiagnosticBuilder(DiagnosticsEngine *diagObj)
1281
      : StreamingDiagnostic(&diagObj->DiagStorage), DiagObj(diagObj),
1282
7.12M
        IsActive(true) {
1283
7.12M
    assert(diagObj && "DiagnosticBuilder requires a valid DiagnosticsEngine!");
1284
0
    assert(DiagStorage &&
1285
7.12M
           "DiagnosticBuilder requires a valid DiagnosticStorage!");
1286
0
    DiagStorage->NumDiagArgs = 0;
1287
7.12M
    DiagStorage->DiagRanges.clear();
1288
7.12M
    DiagStorage->FixItHints.clear();
1289
7.12M
  }
1290
1291
protected:
1292
  /// Clear out the current diagnostic.
1293
13.4M
  void Clear() const {
1294
13.4M
    DiagObj = nullptr;
1295
13.4M
    IsActive = false;
1296
13.4M
    IsForceEmit = false;
1297
13.4M
  }
1298
1299
  /// Determine whether this diagnostic is still active.
1300
24.9M
  bool isActive() const { return IsActive; }
1301
1302
  /// Force the diagnostic builder to emit the diagnostic now.
1303
  ///
1304
  /// Once this function has been called, the DiagnosticBuilder object
1305
  /// should not be used again before it is destroyed.
1306
  ///
1307
  /// \returns true if a diagnostic was emitted, false if the
1308
  /// diagnostic was suppressed.
1309
13.4M
  bool Emit() {
1310
    // If this diagnostic is inactive, then its soul was stolen by the copy ctor
1311
    // (or by a subclass, as in SemaDiagnosticBuilder).
1312
13.4M
    if (!isActive()) 
return false9.48M
;
1313
1314
    // Process the diagnostic.
1315
3.99M
    bool Result = DiagObj->EmitCurrentDiagnostic(IsForceEmit);
1316
1317
    // This diagnostic is dead.
1318
3.99M
    Clear();
1319
1320
3.99M
    return Result;
1321
13.4M
  }
1322
1323
public:
1324
  /// Copy constructor.  When copied, this "takes" the diagnostic info from the
1325
  /// input and neuters it.
1326
6.36M
  DiagnosticBuilder(const DiagnosticBuilder &D) : StreamingDiagnostic() {
1327
6.36M
    DiagObj = D.DiagObj;
1328
6.36M
    DiagStorage = D.DiagStorage;
1329
6.36M
    IsActive = D.IsActive;
1330
6.36M
    IsForceEmit = D.IsForceEmit;
1331
6.36M
    D.Clear();
1332
6.36M
  }
1333
1334
2.15M
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
2.15M
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
2.15M
    DB << V;
1338
2.15M
    return *this;
1339
2.15M
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::comments::CommandMarkerKind>(clang::comments::CommandMarkerKind const&) const
Line
Count
Source
1334
81
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
81
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
81
    DB << V;
1338
81
    return *this;
1339
81
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<int>(int const&) const
Line
Count
Source
1334
52.2k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
52.2k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
52.2k
    DB << V;
1338
52.2k
    return *this;
1339
52.2k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::SourceRange>(clang::SourceRange const&) const
Line
Count
Source
1334
211k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
211k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
211k
    DB << V;
1338
211k
    return *this;
1339
211k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<unsigned int>(unsigned int const&) const
Line
Count
Source
1334
97.0k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
97.0k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
97.0k
    DB << V;
1338
97.0k
    return *this;
1339
97.0k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::CXXRecordDecl const*>(clang::CXXRecordDecl const* const&) const
Line
Count
Source
1334
189
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
189
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
189
    DB << V;
1338
189
    return *this;
1339
189
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::CXXMethodDecl const*>(clang::CXXMethodDecl const* const&) const
Line
Count
Source
1334
40
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
40
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
40
    DB << V;
1338
40
    return *this;
1339
40
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char const*>(char const* const&) const
Line
Count
Source
1334
8.49k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
8.49k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
8.49k
    DB << V;
1338
8.49k
    return *this;
1339
8.49k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [21]>(char const (&) [21]) const
Line
Count
Source
1334
4.58k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
4.58k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
4.58k
    DB << V;
1338
4.58k
    return *this;
1339
4.58k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [17]>(char const (&) [17]) const
Line
Count
Source
1334
105
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
105
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
105
    DB << V;
1338
105
    return *this;
1339
105
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<llvm::SmallString<256u> >(llvm::SmallString<256u> const&) const
Line
Count
Source
1334
3
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
3
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
3
    DB << V;
1338
3
    return *this;
1339
3
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [9]>(char const (&) [9]) const
Line
Count
Source
1334
19.3k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
19.3k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
19.3k
    DB << V;
1338
19.3k
    return *this;
1339
19.3k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [10]>(char const (&) [10]) const
Line
Count
Source
1334
332
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
332
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
332
    DB << V;
1338
332
    return *this;
1339
332
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [12]>(char const (&) [12]) const
Line
Count
Source
1334
275
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
275
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
275
    DB << V;
1338
275
    return *this;
1339
275
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [38]>(char const (&) [38]) const
Line
Count
Source
1334
14
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
14
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
14
    DB << V;
1338
14
    return *this;
1339
14
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [11]>(char const (&) [11]) const
Line
Count
Source
1334
49
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
49
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
49
    DB << V;
1338
49
    return *this;
1339
49
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [84]>(char const (&) [84]) const
Line
Count
Source
1334
16
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
16
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
16
    DB << V;
1338
16
    return *this;
1339
16
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [16]>(char const (&) [16]) const
Line
Count
Source
1334
439
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
439
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
439
    DB << V;
1338
439
    return *this;
1339
439
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [14]>(char const (&) [14]) const
Line
Count
Source
1334
90
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
90
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
90
    DB << V;
1338
90
    return *this;
1339
90
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [15]>(char const (&) [15]) const
Line
Count
Source
1334
31
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
31
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
31
    DB << V;
1338
31
    return *this;
1339
31
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [25]>(char const (&) [25]) const
Line
Count
Source
1334
20
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
20
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
20
    DB << V;
1338
20
    return *this;
1339
20
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [23]>(char const (&) [23]) const
Line
Count
Source
1334
71
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
71
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
71
    DB << V;
1338
71
    return *this;
1339
71
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [8]>(char const (&) [8]) const
Line
Count
Source
1334
121
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
121
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
121
    DB << V;
1338
121
    return *this;
1339
121
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [3]>(char const (&) [3]) const
Line
Count
Source
1334
262
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
262
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
262
    DB << V;
1338
262
    return *this;
1339
262
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [6]>(char const (&) [6]) const
Line
Count
Source
1334
8.49k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
8.49k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
8.49k
    DB << V;
1338
8.49k
    return *this;
1339
8.49k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [27]>(char const (&) [27]) const
Line
Count
Source
1334
15
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
15
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
15
    DB << V;
1338
15
    return *this;
1339
15
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [33]>(char const (&) [33]) const
Line
Count
Source
1334
4
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
4
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
4
    DB << V;
1338
4
    return *this;
1339
4
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [13]>(char const (&) [13]) const
Line
Count
Source
1334
52
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
52
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
52
    DB << V;
1338
52
    return *this;
1339
52
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [4]>(char const (&) [4]) const
Line
Count
Source
1334
192
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
192
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
192
    DB << V;
1338
192
    return *this;
1339
192
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<bool>(bool const&) const
Line
Count
Source
1334
120k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
120k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
120k
    DB << V;
1338
120k
    return *this;
1339
120k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::NamedDecl const*>(clang::NamedDecl const* const&) const
Line
Count
Source
1334
204k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
204k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
204k
    DB << V;
1338
204k
    return *this;
1339
204k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<llvm::StringRef>(llvm::StringRef const&) const
Line
Count
Source
1334
72.4k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
72.4k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
72.4k
    DB << V;
1338
72.4k
    return *this;
1339
72.4k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const
Line
Count
Source
1334
116k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
116k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
116k
    DB << V;
1338
116k
    return *this;
1339
116k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::CharSourceRange>(clang::CharSourceRange const&) const
Line
Count
Source
1334
5.50k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
5.50k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
5.50k
    DB << V;
1338
5.50k
    return *this;
1339
5.50k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<llvm::SmallString<5u> >(llvm::SmallString<5u> const&) const
Line
Count
Source
1334
76
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
76
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
76
    DB << V;
1338
76
    return *this;
1339
76
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [2]>(char const (&) [2]) const
Line
Count
Source
1334
268
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
268
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
268
    DB << V;
1338
268
    return *this;
1339
268
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::NumericLiteralParser::CheckSeparatorKind>(clang::NumericLiteralParser::CheckSeparatorKind const&) const
Line
Count
Source
1334
36
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
36
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
36
    DB << V;
1338
36
    return *this;
1339
36
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::IdentifierInfo*>(clang::IdentifierInfo* const&) const
Line
Count
Source
1334
89.3k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
89.3k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
89.3k
    DB << V;
1338
89.3k
    return *this;
1339
89.3k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::FixItHint>(clang::FixItHint const&) const
Line
Count
Source
1334
62.3k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
62.3k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
62.3k
    DB << V;
1338
62.3k
    return *this;
1339
62.3k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<llvm::SmallString<128u> >(llvm::SmallString<128u> const&) const
Line
Count
Source
1334
11.5k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
11.5k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
11.5k
    DB << V;
1338
11.5k
    return *this;
1339
11.5k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<PPElifDiag>(PPElifDiag const&) const
Line
Count
Source
1334
5
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
5
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
5
    DB << V;
1338
5
    return *this;
1339
5
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [1]>(char const (&) [1]) const
Line
Count
Source
1334
108
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
108
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
108
    DB << V;
1338
108
    return *this;
1339
108
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<llvm::SmallString<32u> >(llvm::SmallString<32u> const&) const
Line
Count
Source
1334
371
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
371
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
371
    DB << V;
1338
371
    return *this;
1339
371
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::IdentifierInfo const*>(clang::IdentifierInfo const* const&) const
Line
Count
Source
1334
1.17k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
1.17k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
1.17k
    DB << V;
1338
1.17k
    return *this;
1339
1.17k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::PPCallbacks::PragmaMessageKind>(clang::PPCallbacks::PragmaMessageKind const&) const
Line
Count
Source
1334
2
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
2
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
2
    DB << V;
1338
2
    return *this;
1339
2
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [45]>(char const (&) [45]) const
Line
Count
Source
1334
90
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
90
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
90
    DB << V;
1338
90
    return *this;
1339
90
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [28]>(char const (&) [28]) const
Line
Count
Source
1334
2
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
2
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
2
    DB << V;
1338
2
    return *this;
1339
2
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [19]>(char const (&) [19]) const
Line
Count
Source
1334
237
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
237
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
237
    DB << V;
1338
237
    return *this;
1339
237
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [26]>(char const (&) [26]) const
Line
Count
Source
1334
4
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
4
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
4
    DB << V;
1338
4
    return *this;
1339
4
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [31]>(char const (&) [31]) const
Line
Count
Source
1334
15
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
15
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
15
    DB << V;
1338
15
    return *this;
1339
15
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [18]>(char const (&) [18]) const
Line
Count
Source
1334
55
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
55
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
55
    DB << V;
1338
55
    return *this;
1339
55
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [24]>(char const (&) [24]) const
Line
Count
Source
1334
37
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
37
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
37
    DB << V;
1338
37
    return *this;
1339
37
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [29]>(char const (&) [29]) const
Line
Count
Source
1334
63
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
63
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
63
    DB << V;
1338
63
    return *this;
1339
63
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [34]>(char const (&) [34]) const
Line
Count
Source
1334
44
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
44
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
44
    DB << V;
1338
44
    return *this;
1339
44
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [39]>(char const (&) [39]) const
Line
Count
Source
1334
15
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
15
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
15
    DB << V;
1338
15
    return *this;
1339
15
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [36]>(char const (&) [36]) const
Line
Count
Source
1334
29
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
29
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
29
    DB << V;
1338
29
    return *this;
1339
29
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [54]>(char const (&) [54]) const
Line
Count
Source
1334
4
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
4
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
4
    DB << V;
1338
4
    return *this;
1339
4
  }
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [60]>(char const (&) [60]) const
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [53]>(char const (&) [53]) const
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [42]>(char const (&) [42]) const
Line
Count
Source
1334
3
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
3
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
3
    DB << V;
1338
3
    return *this;
1339
3
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [22]>(char const (&) [22]) const
Line
Count
Source
1334
17
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
17
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
17
    DB << V;
1338
17
    return *this;
1339
17
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [35]>(char const (&) [35]) const
Line
Count
Source
1334
22
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
22
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
22
    DB << V;
1338
22
    return *this;
1339
22
  }
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [70]>(char const (&) [70]) const
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [49]>(char const (&) [49]) const
Line
Count
Source
1334
5
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
5
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
5
    DB << V;
1338
5
    return *this;
1339
5
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [7]>(char const (&) [7]) const
Line
Count
Source
1334
311
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
311
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
311
    DB << V;
1338
311
    return *this;
1339
311
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [32]>(char const (&) [32]) const
Line
Count
Source
1334
3
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
3
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
3
    DB << V;
1338
3
    return *this;
1339
3
  }
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [63]>(char const (&) [63]) const
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [75]>(char const (&) [75]) const
Line
Count
Source
1334
1
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
1
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
1
    DB << V;
1338
1
    return *this;
1339
1
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [37]>(char const (&) [37]) const
Line
Count
Source
1334
9
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
9
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
9
    DB << V;
1338
9
    return *this;
1339
9
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [47]>(char const (&) [47]) const
Line
Count
Source
1334
5
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
5
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
5
    DB << V;
1338
5
    return *this;
1339
5
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [5]>(char const (&) [5]) const
Line
Count
Source
1334
2.09k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
2.09k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
2.09k
    DB << V;
1338
2.09k
    return *this;
1339
2.09k
  }
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [52]>(char const (&) [52]) const
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [44]>(char const (&) [44]) const
Line
Count
Source
1334
2
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
2
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
2
    DB << V;
1338
2
    return *this;
1339
2
  }
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [51]>(char const (&) [51]) const
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [76]>(char const (&) [76]) const
Line
Count
Source
1334
3
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
3
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
3
    DB << V;
1338
3
    return *this;
1339
3
  }
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [100]>(char const (&) [100]) const
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [50]>(char const (&) [50]) const
Line
Count
Source
1334
20
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
20
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
20
    DB << V;
1338
20
    return *this;
1339
20
  }
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [66]>(char const (&) [66]) const
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [48]>(char const (&) [48]) const
Line
Count
Source
1334
6
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
6
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
6
    DB << V;
1338
6
    return *this;
1339
6
  }
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [65]>(char const (&) [65]) const
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [43]>(char const (&) [43]) const
Line
Count
Source
1334
6
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
6
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
6
    DB << V;
1338
6
    return *this;
1339
6
  }
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [59]>(char const (&) [59]) const
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [57]>(char const (&) [57]) const
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [166]>(char const (&) [166]) const
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [81]>(char const (&) [81]) const
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [40]>(char const (&) [40]) const
Line
Count
Source
1334
1
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
1
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
1
    DB << V;
1338
1
    return *this;
1339
1
  }
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [141]>(char const (&) [141]) const
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [62]>(char const (&) [62]) const
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [87]>(char const (&) [87]) const
Line
Count
Source
1334
3
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
3
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
3
    DB << V;
1338
3
    return *this;
1339
3
  }
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [94]>(char const (&) [94]) const
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [102]>(char const (&) [102]) const
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [113]>(char const (&) [113]) const
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [111]>(char const (&) [111]) const
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [112]>(char const (&) [112]) const
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [61]>(char const (&) [61]) const
Line
Count
Source
1334
17
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
17
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
17
    DB << V;
1338
17
    return *this;
1339
17
  }
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [96]>(char const (&) [96]) const
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [83]>(char const (&) [83]) const
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [98]>(char const (&) [98]) const
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [20]>(char const (&) [20]) const
Line
Count
Source
1334
203
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
203
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
203
    DB << V;
1338
203
    return *this;
1339
203
  }
ASTReader.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ASTReader::diagnoseOdrViolations()::ODRDefinitionDataDifference>(clang::ASTReader::diagnoseOdrViolations()::ODRDefinitionDataDifference const&) const
Line
Count
Source
1334
20
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
20
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
20
    DB << V;
1338
20
    return *this;
1339
20
  }
ASTReader.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ASTReader::diagnoseOdrViolations()::ODRTemplateDifference>(clang::ASTReader::diagnoseOdrViolations()::ODRTemplateDifference const&) const
Line
Count
Source
1334
12
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
12
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
12
    DB << V;
1338
12
    return *this;
1339
12
  }
ASTReader.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ASTReader::diagnoseOdrViolations()::ODRMismatchDeclDifference>(clang::ASTReader::diagnoseOdrViolations()::ODRMismatchDeclDifference const&) const
Line
Count
Source
1334
194
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
194
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
194
    DB << V;
1338
194
    return *this;
1339
194
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::FunctionDecl*>(clang::FunctionDecl* const&) const
Line
Count
Source
1334
276k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
276k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
276k
    DB << V;
1338
276k
    return *this;
1339
276k
  }
ASTReader.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ASTReader::diagnoseOdrViolations()::ODRFunctionDifference>(clang::ASTReader::diagnoseOdrViolations()::ODRFunctionDifference const&) const
Line
Count
Source
1334
70
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
70
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
70
    DB << V;
1338
70
    return *this;
1339
70
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::EnumDecl*>(clang::EnumDecl* const&) const
Line
Count
Source
1334
65
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
65
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
65
    DB << V;
1338
65
    return *this;
1339
65
  }
ASTReader.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ASTReader::diagnoseOdrViolations()::ODREnumDifference>(clang::ASTReader::diagnoseOdrViolations()::ODREnumDifference const&) const
Line
Count
Source
1334
26
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
26
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
26
    DB << V;
1338
26
    return *this;
1339
26
  }
ASTReader.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ASTReader::getInputFile(clang::serialization::ModuleFile&, unsigned int, bool)::ModificationType>(clang::ASTReader::getInputFile(clang::serialization::ModuleFile&, unsigned int, bool)::ModificationType const&) const
Line
Count
Source
1334
10
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
10
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
10
    DB << V;
1338
10
    return *this;
1339
10
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::NamedDecl*>(clang::NamedDecl* const&) const
Line
Count
Source
1334
141k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
141k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
141k
    DB << V;
1338
141k
    return *this;
1339
141k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::DeclContext*>(clang::DeclContext* const&) const
Line
Count
Source
1334
51.2k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
51.2k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
51.2k
    DB << V;
1338
51.2k
    return *this;
1339
51.2k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::QualType>(clang::QualType const&) const
Line
Count
Source
1334
313k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
313k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
313k
    DB << V;
1338
313k
    return *this;
1339
313k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::DeclarationName>(clang::DeclarationName const&) const
Line
Count
Source
1334
31.3k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
31.3k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
31.3k
    DB << V;
1338
31.3k
    return *this;
1339
31.3k
  }
ASTReader.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ASTReader::diagnoseOdrViolations()::ODRMismatchDecl>(clang::ASTReader::diagnoseOdrViolations()::ODRMismatchDecl const&) const
Line
Count
Source
1334
88
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
88
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
88
    DB << V;
1338
88
    return *this;
1339
88
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::CXXRecordDecl*>(clang::CXXRecordDecl* const&) const
Line
Count
Source
1334
7.24k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
7.24k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
7.24k
    DB << V;
1338
7.24k
    return *this;
1339
7.24k
  }
ASTReader.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ASTReader::diagnoseOdrViolations()::$_9>(clang::ASTReader::diagnoseOdrViolations()::$_9 const&) const
Line
Count
Source
1334
68
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
68
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
68
    DB << V;
1338
68
    return *this;
1339
68
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::TemplateArgument>(clang::TemplateArgument const&) const
Line
Count
Source
1334
702
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
702
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
702
    DB << V;
1338
702
    return *this;
1339
702
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::FunctionTemplateDecl*>(clang::FunctionTemplateDecl* const&) const
Line
Count
Source
1334
120
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
120
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
120
    DB << V;
1338
120
    return *this;
1339
120
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Expr*>(clang::Expr* const&) const
Line
Count
Source
1334
311
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
311
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
311
    DB << V;
1338
311
    return *this;
1339
311
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::EnumConstantDecl const*>(clang::EnumConstantDecl const* const&) const
Line
Count
Source
1334
8
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
8
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
8
    DB << V;
1338
8
    return *this;
1339
8
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [69]>(char const (&) [69]) const
Line
Count
Source
1334
4
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
4
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
4
    DB << V;
1338
4
    return *this;
1339
4
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [68]>(char const (&) [68]) const
Line
Count
Source
1334
1
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
1
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
1
    DB << V;
1338
1
    return *this;
1339
1
  }
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [107]>(char const (&) [107]) const
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [41]>(char const (&) [41]) const
Line
Count
Source
1334
7
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
7
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
7
    DB << V;
1338
7
    return *this;
1339
7
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [144]>(char const (&) [144]) const
Line
Count
Source
1334
27
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
27
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
27
    DB << V;
1338
27
    return *this;
1339
27
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [30]>(char const (&) [30]) const
Line
Count
Source
1334
29
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
29
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
29
    DB << V;
1338
29
    return *this;
1339
29
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [56]>(char const (&) [56]) const
Line
Count
Source
1334
44
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
44
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
44
    DB << V;
1338
44
    return *this;
1339
44
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<llvm::SmallString<64u> >(llvm::SmallString<64u> const&) const
Line
Count
Source
1334
46
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
46
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
46
    DB << V;
1338
46
    return *this;
1339
46
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<llvm::SmallString<512u> >(llvm::SmallString<512u> const&) const
Line
Count
Source
1334
182
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
182
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
182
    DB << V;
1338
182
    return *this;
1339
182
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::MSPropertyDecl const*>(clang::MSPropertyDecl const* const&) const
Line
Count
Source
1334
1
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
1
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
1
    DB << V;
1338
1
    return *this;
1339
1
  }
ParseOpenMP.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<(anonymous namespace)::OMPContextLvl>((anonymous namespace)::OMPContextLvl const&) const
Line
Count
Source
1334
168
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
168
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
168
    DB << V;
1338
168
    return *this;
1339
168
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Sema::PragmaClangSectionKind>(clang::Sema::PragmaClangSectionKind const&) const
Line
Count
Source
1334
5
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
5
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
5
    DB << V;
1338
5
    return *this;
1339
5
  }
ParsePragma.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<(anonymous namespace)::TokFPAnnotValue::FlagKinds>((anonymous namespace)::TokFPAnnotValue::FlagKinds const&) const
Line
Count
Source
1334
3
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
3
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
3
    DB << V;
1338
3
    return *this;
1339
3
  }
ParseStmt.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<(anonymous namespace)::MisleadingStatementKind>((anonymous namespace)::MisleadingStatementKind const&) const
Line
Count
Source
1334
46
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
46
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
46
    DB << V;
1338
46
    return *this;
1339
46
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::tok::TokenKind>(clang::tok::TokenKind const&) const
Line
Count
Source
1334
42.9k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
42.9k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
42.9k
    DB << V;
1338
42.9k
    return *this;
1339
42.9k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Parser::ExtraSemiKind>(clang::Parser::ExtraSemiKind const&) const
Line
Count
Source
1334
1.38k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
1.38k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
1.38k
    DB << V;
1338
1.38k
    return *this;
1339
1.38k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ObjCMethodDecl const*>(clang::ObjCMethodDecl const* const&) const
Line
Count
Source
1334
1
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
1
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
1
    DB << V;
1338
1
    return *this;
1339
1
  }
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [46]>(char const (&) [46]) const
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::NoDestroyAttr const*>(clang::NoDestroyAttr const* const&) const
Line
Count
Source
1334
4
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
4
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
4
    DB << V;
1338
4
    return *this;
1339
4
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::NotTailCalledAttr const*>(clang::NotTailCalledAttr const* const&) const
Line
Count
Source
1334
1
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
1
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
1
    DB << V;
1338
1
    return *this;
1339
1
  }
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::CFUnknownTransferAttr const*>(clang::CFUnknownTransferAttr const* const&) const
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::CFAuditedTransferAttr const*>(clang::CFAuditedTransferAttr const* const&) const
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::CUDASharedAttr const*>(clang::CUDASharedAttr const* const&) const
Line
Count
Source
1334
6
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
6
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
6
    DB << V;
1338
6
    return *this;
1339
6
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::HIPManagedAttr const*>(clang::HIPManagedAttr const* const&) const
Line
Count
Source
1334
8
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
8
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
8
    DB << V;
1338
8
    return *this;
1339
8
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::CUDAGlobalAttr const*>(clang::CUDAGlobalAttr const* const&) const
Line
Count
Source
1334
4
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
4
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
4
    DB << V;
1338
4
    return *this;
1339
4
  }
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::CUDADeviceBuiltinTextureTypeAttr const*>(clang::CUDADeviceBuiltinTextureTypeAttr const* const&) const
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::CUDADeviceBuiltinSurfaceTypeAttr const*>(clang::CUDADeviceBuiltinSurfaceTypeAttr const* const&) const
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::CUDADeviceAttr const*>(clang::CUDADeviceAttr const* const&) const
Line
Count
Source
1334
2
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
2
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
2
    DB << V;
1338
2
    return *this;
1339
2
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::CUDAHostAttr const*>(clang::CUDAHostAttr const* const&) const
Line
Count
Source
1334
2
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
2
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
2
    DB << V;
1338
2
    return *this;
1339
2
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::CUDAConstantAttr const*>(clang::CUDAConstantAttr const* const&) const
Line
Count
Source
1334
8
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
8
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
8
    DB << V;
1338
8
    return *this;
1339
8
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::HotAttr const*>(clang::HotAttr const* const&) const
Line
Count
Source
1334
3
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
3
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
3
    DB << V;
1338
3
    return *this;
1339
3
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::InternalLinkageAttr const*>(clang::InternalLinkageAttr const* const&) const
Line
Count
Source
1334
6
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
6
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
6
    DB << V;
1338
6
    return *this;
1339
6
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [58]>(char const (&) [58]) const
Line
Count
Source
1334
230
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
230
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
230
    DB << V;
1338
230
    return *this;
1339
230
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::NakedAttr const*>(clang::NakedAttr const* const&) const
Line
Count
Source
1334
3
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
3
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
3
    DB << V;
1338
3
    return *this;
1339
3
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ColdAttr const*>(clang::ColdAttr const* const&) const
Line
Count
Source
1334
3
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
3
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
3
    DB << V;
1338
3
    return *this;
1339
3
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::CommonAttr const*>(clang::CommonAttr const* const&) const
Line
Count
Source
1334
5
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
5
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
5
    DB << V;
1338
5
    return *this;
1339
5
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Mips16Attr const*>(clang::Mips16Attr const* const&) const
Line
Count
Source
1334
4
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
4
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
4
    DB << V;
1338
4
    return *this;
1339
4
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::MipsInterruptAttr const*>(clang::MipsInterruptAttr const* const&) const
Line
Count
Source
1334
2
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
2
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
2
    DB << V;
1338
2
    return *this;
1339
2
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::MicroMipsAttr const*>(clang::MicroMipsAttr const* const&) const
Line
Count
Source
1334
1
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
1
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
1
    DB << V;
1338
1
    return *this;
1339
1
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::MipsShortCallAttr const*>(clang::MipsShortCallAttr const* const&) const
Line
Count
Source
1334
2
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
2
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
2
    DB << V;
1338
2
    return *this;
1339
2
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::MipsLongCallAttr const*>(clang::MipsLongCallAttr const* const&) const
Line
Count
Source
1334
2
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
2
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
2
    DB << V;
1338
2
    return *this;
1339
2
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::DisableTailCallsAttr const*>(clang::DisableTailCallsAttr const* const&) const
Line
Count
Source
1334
3
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
3
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
3
    DB << V;
1338
3
    return *this;
1339
3
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::AlwaysDestroyAttr const*>(clang::AlwaysDestroyAttr const* const&) const
Line
Count
Source
1334
4
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
4
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
4
    DB << V;
1338
4
    return *this;
1339
4
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::SpeculativeLoadHardeningAttr const*>(clang::SpeculativeLoadHardeningAttr const* const&) const
Line
Count
Source
1334
4
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
4
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
4
    DB << V;
1338
4
    return *this;
1339
4
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::AlwaysInlineAttr const*>(clang::AlwaysInlineAttr const* const&) const
Line
Count
Source
1334
1
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
1
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
1
    DB << V;
1338
1
    return *this;
1339
1
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [71]>(char const (&) [71]) const
Line
Count
Source
1334
5
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
5
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
5
    DB << V;
1338
5
    return *this;
1339
5
  }
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [92]>(char const (&) [92]) const
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [67]>(char const (&) [67]) const
Line
Count
Source
1334
3
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
3
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
3
    DB << V;
1338
3
    return *this;
1339
3
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::PointerAttr const*>(clang::PointerAttr const* const&) const
Line
Count
Source
1334
1
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
1
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
1
    DB << V;
1338
1
    return *this;
1339
1
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::OwnerAttr const*>(clang::OwnerAttr const* const&) const
Line
Count
Source
1334
3
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
3
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
3
    DB << V;
1338
3
    return *this;
1339
3
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [77]>(char const (&) [77]) const
Line
Count
Source
1334
4
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
4
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
4
    DB << V;
1338
4
    return *this;
1339
4
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::NoSpeculativeLoadHardeningAttr const*>(clang::NoSpeculativeLoadHardeningAttr const* const&) const
Line
Count
Source
1334
4
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
4
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
4
    DB << V;
1338
4
    return *this;
1339
4
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char [150]>(char const (&) [150]) const
Line
Count
Source
1334
1
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
1
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
1
    DB << V;
1338
1
    return *this;
1339
1
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ValueDecl*>(clang::ValueDecl* const&) const
Line
Count
Source
1334
7.79k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
7.79k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
7.79k
    DB << V;
1338
7.79k
    return *this;
1339
7.79k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::CanonicalDeclPtr<clang::FunctionDecl> >(clang::CanonicalDeclPtr<clang::FunctionDecl> const&) const
Line
Count
Source
1334
127
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
127
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
127
    DB << V;
1338
127
    return *this;
1339
127
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::FunctionDecl const*>(clang::FunctionDecl const* const&) const
Line
Count
Source
1334
26.6k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
26.6k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
26.6k
    DB << V;
1338
26.6k
    return *this;
1339
26.6k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::VarDecl const*>(clang::VarDecl const* const&) const
Line
Count
Source
1334
4.95k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
4.95k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
4.95k
    DB << V;
1338
4.95k
    return *this;
1339
4.95k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ASTContext::SectionInfo>(clang::ASTContext::SectionInfo const&) const
Line
Count
Source
1334
23
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
23
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
23
    DB << V;
1338
23
    return *this;
1339
23
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ParsedAttr>(clang::ParsedAttr const&) const
Line
Count
Source
1334
18.9k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
18.9k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
18.9k
    DB << V;
1338
18.9k
    return *this;
1339
18.9k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<llvm::SmallVector<clang::FixItHint, 12u> >(llvm::SmallVector<clang::FixItHint, 12u> const&) const
Line
Count
Source
1334
33.1k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
33.1k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
33.1k
    DB << V;
1338
33.1k
    return *this;
1339
33.1k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<CastType>(CastType const&) const
Line
Count
Source
1334
363
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
363
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
363
    DB << V;
1338
363
    return *this;
1339
363
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<llvm::SmallString<16u> >(llvm::SmallString<16u> const&) const
Line
Count
Source
1334
233
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
233
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
233
    DB << V;
1338
233
    return *this;
1339
233
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<llvm::ArrayRef<clang::FixItHint> >(llvm::ArrayRef<clang::FixItHint> const&) const
Line
Count
Source
1334
25.6k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
25.6k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
25.6k
    DB << V;
1338
25.6k
    return *this;
1339
25.6k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<AbsoluteValueKind>(AbsoluteValueKind const&) const
Line
Count
Source
1334
768
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
768
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
768
    DB << V;
1338
768
    return *this;
1339
768
  }
SemaChecking.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Sema::DiagnoseAlwaysNonNullPointer(clang::Expr*, clang::Expr::NullPointerConstantKind, bool, clang::SourceRange)::$_14>(clang::Sema::DiagnoseAlwaysNonNullPointer(clang::Expr*, clang::Expr::NullPointerConstantKind, bool, clang::SourceRange)::$_14 const&) const
Line
Count
Source
1334
252
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
252
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
252
    DB << V;
1338
252
    return *this;
1339
252
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ConceptSpecializationExpr*>(clang::ConceptSpecializationExpr* const&) const
Line
Count
Source
1334
36
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
36
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
36
    DB << V;
1338
36
    return *this;
1339
36
  }
SemaCoroutine.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<isValidCoroutineContext(clang::Sema&, clang::SourceLocation, llvm::StringRef)::InvalidFuncDiag>(isValidCoroutineContext(clang::Sema&, clang::SourceLocation, llvm::StringRef)::InvalidFuncDiag const&) const
Line
Count
Source
1334
25
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
25
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
25
    DB << V;
1338
25
    return *this;
1339
25
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::LabelDecl*>(clang::LabelDecl* const&) const
Line
Count
Source
1334
377
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
377
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
377
    DB << V;
1338
377
    return *this;
1339
377
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::AlignedAttr const*>(clang::AlignedAttr const* const&) const
Line
Count
Source
1334
8
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
8
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
8
    DB << V;
1338
8
    return *this;
1339
8
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::AlignedAttr*>(clang::AlignedAttr* const&) const
Line
Count
Source
1334
27
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
27
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
27
    DB << V;
1338
27
    return *this;
1339
27
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::DLLImportAttr const*>(clang::DLLImportAttr const* const&) const
Line
Count
Source
1334
511
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
511
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
511
    DB << V;
1338
511
    return *this;
1339
511
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Attr const*>(clang::Attr const* const&) const
Line
Count
Source
1334
17
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
17
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
17
    DB << V;
1338
17
    return *this;
1339
17
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::FieldDecl const*>(clang::FieldDecl const* const&) const
Line
Count
Source
1334
159
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
159
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
159
    DB << V;
1338
159
    return *this;
1339
159
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::AnyX86NoCallerSavedRegistersAttr*>(clang::AnyX86NoCallerSavedRegistersAttr* const&) const
Line
Count
Source
1334
1
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
1
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
1
    DB << V;
1338
1
    return *this;
1339
1
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::CXX11NoReturnAttr const*>(clang::CXX11NoReturnAttr const* const&) const
Line
Count
Source
1334
1
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
1
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
1
    DB << V;
1338
1
    return *this;
1339
1
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::VarDecl*>(clang::VarDecl* const&) const
Line
Count
Source
1334
7.45k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
7.45k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
7.45k
    DB << V;
1338
7.45k
    return *this;
1339
7.45k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::TypedefNameDecl*>(clang::TypedefNameDecl* const&) const
Line
Count
Source
1334
75
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
75
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
75
    DB << V;
1338
75
    return *this;
1339
75
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::TemplateName>(clang::TemplateName const&) const
Line
Count
Source
1334
378
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
378
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
378
    DB << V;
1338
378
    return *this;
1339
378
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::InheritableAttr const*>(clang::InheritableAttr const* const&) const
Line
Count
Source
1334
431
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
431
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
431
    DB << V;
1338
431
    return *this;
1339
431
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<ShadowedDeclKind>(ShadowedDeclKind const&) const
Line
Count
Source
1334
147
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
147
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
147
    DB << V;
1338
147
    return *this;
1339
147
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::DeclContext const*>(clang::DeclContext const* const&) const
Line
Count
Source
1334
52
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
52
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
52
    DB << V;
1338
52
    return *this;
1339
52
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::StorageClass>(clang::StorageClass const&) const
Line
Count
Source
1334
1
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
1
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
1
    DB << V;
1338
1
    return *this;
1339
1
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Sema::NonTrivialCUnionContext>(clang::Sema::NonTrivialCUnionContext const&) const
Line
Count
Source
1334
81
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
81
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
81
    DB << V;
1338
81
    return *this;
1339
81
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<llvm::SmallVector<clang::FixItHint, 1u> >(llvm::SmallVector<clang::FixItHint, 1u> const&) const
Line
Count
Source
1334
17
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
17
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
17
    DB << V;
1338
17
    return *this;
1339
17
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::UsedAttr*>(clang::UsedAttr* const&) const
Line
Count
Source
1334
4
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
4
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
4
    DB << V;
1338
4
    return *this;
1339
4
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::RetainAttr*>(clang::RetainAttr* const&) const
Line
Count
Source
1334
2
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
2
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
2
    DB << V;
1338
2
    return *this;
1339
2
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ParmVarDecl*>(clang::ParmVarDecl* const&) const
Line
Count
Source
1334
4
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
4
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
4
    DB << V;
1338
4
    return *this;
1339
4
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ParmVarDecl const*>(clang::ParmVarDecl const* const&) const
Line
Count
Source
1334
43
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
43
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
43
    DB << V;
1338
43
    return *this;
1339
43
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::TypedefDecl*>(clang::TypedefDecl* const&) const
Line
Count
Source
1334
1
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
1
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
1
    DB << V;
1338
1
    return *this;
1339
1
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::TagTypeKind>(clang::TagTypeKind const&) const
Line
Count
Source
1334
80
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
80
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
80
    DB << V;
1338
80
    return *this;
1339
80
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Sema::NonTagKind>(clang::Sema::NonTagKind const&) const
Line
Count
Source
1334
28
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
28
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
28
    DB << V;
1338
28
    return *this;
1339
28
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::TagDecl*>(clang::TagDecl* const&) const
Line
Count
Source
1334
11
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
11
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
11
    DB << V;
1338
11
    return *this;
1339
11
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Sema::CXXSpecialMember>(clang::Sema::CXXSpecialMember const&) const
Line
Count
Source
1334
621
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
621
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
621
    DB << V;
1338
621
    return *this;
1339
621
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::RecordDecl*>(clang::RecordDecl* const&) const
Line
Count
Source
1334
23
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
23
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
23
    DB << V;
1338
23
    return *this;
1339
23
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::EnumConstantDecl*>(clang::EnumConstantDecl* const&) const
Line
Count
Source
1334
25
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
25
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
25
    DB << V;
1338
25
    return *this;
1339
25
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::OwnershipAttr const*>(clang::OwnershipAttr const* const&) const
Line
Count
Source
1334
1
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
1
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
1
    DB << V;
1338
1
    return *this;
1339
1
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::VecReturnAttr*>(clang::VecReturnAttr* const&) const
Line
Count
Source
1334
1
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
1
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
1
    DB << V;
1338
1
    return *this;
1339
1
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::AttributeDeclKind>(clang::AttributeDeclKind const&) const
Line
Count
Source
1334
2
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
2
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
2
    DB << V;
1338
2
    return *this;
1339
2
  }
SemaDeclAttr.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<handleXReturnsXRetainedAttr(clang::Sema&, clang::Decl*, clang::ParsedAttr const&)::$_3>(handleXReturnsXRetainedAttr(clang::Sema&, clang::Decl*, clang::ParsedAttr const&)::$_3 const&) const
Line
Count
Source
1334
13
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
13
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
13
    DB << V;
1338
13
    return *this;
1339
13
  }
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::SwiftAsyncAttr const*>(clang::SwiftAsyncAttr const* const&) const
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::SwiftAsyncErrorAttr const*>(clang::SwiftAsyncErrorAttr const* const&) const
Line
Count
Source
1334
5
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
5
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
5
    DB << V;
1338
5
    return *this;
1339
5
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::AttributeCommonInfo>(clang::AttributeCommonInfo const&) const
Line
Count
Source
1334
6
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
6
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
6
    DB << V;
1338
6
    return *this;
1339
6
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::SwiftNameAttr const*>(clang::SwiftNameAttr const* const&) const
Line
Count
Source
1334
1
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
1
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
1
    DB << V;
1338
1
    return *this;
1339
1
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::AlwaysInlineAttr*>(clang::AlwaysInlineAttr* const&) const
Line
Count
Source
1334
6
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
6
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
6
    DB << V;
1338
6
    return *this;
1339
6
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::MinSizeAttr*>(clang::MinSizeAttr* const&) const
Line
Count
Source
1334
3
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
3
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
3
    DB << V;
1338
3
    return *this;
1339
3
  }
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ParameterABIAttr*>(clang::ParameterABIAttr* const&) const
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::DLLImportAttr*>(clang::DLLImportAttr* const&) const
Line
Count
Source
1334
169
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
169
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
169
    DB << V;
1338
169
    return *this;
1339
169
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ReqdWorkGroupSizeAttr const*>(clang::ReqdWorkGroupSizeAttr const* const&) const
Line
Count
Source
1334
2
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
2
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
2
    DB << V;
1338
2
    return *this;
1339
2
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::WorkGroupSizeHintAttr const*>(clang::WorkGroupSizeHintAttr const* const&) const
Line
Count
Source
1334
2
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
2
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
2
    DB << V;
1338
2
    return *this;
1339
2
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::VecTypeHintAttr const*>(clang::VecTypeHintAttr const* const&) const
Line
Count
Source
1334
2
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
2
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
2
    DB << V;
1338
2
    return *this;
1339
2
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::OpenCLIntelReqdSubGroupSizeAttr const*>(clang::OpenCLIntelReqdSubGroupSizeAttr const* const&) const
Line
Count
Source
1334
2
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
2
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
2
    DB << V;
1338
2
    return *this;
1339
2
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::AMDGPUFlatWorkGroupSizeAttr const*>(clang::AMDGPUFlatWorkGroupSizeAttr const* const&) const
Line
Count
Source
1334
1
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
1
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
1
    DB << V;
1338
1
    return *this;
1339
1
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::AMDGPUWavesPerEUAttr const*>(clang::AMDGPUWavesPerEUAttr const* const&) const
Line
Count
Source
1334
2
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
2
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
2
    DB << V;
1338
2
    return *this;
1339
2
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::AMDGPUNumSGPRAttr const*>(clang::AMDGPUNumSGPRAttr const* const&) const
Line
Count
Source
1334
1
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
1
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
1
    DB << V;
1338
1
    return *this;
1339
1
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::AMDGPUNumVGPRAttr const*>(clang::AMDGPUNumVGPRAttr const* const&) const
Line
Count
Source
1334
1
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
1
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
1
    DB << V;
1338
1
    return *this;
1339
1
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Sema::AbstractDiagSelID>(clang::Sema::AbstractDiagSelID const&) const
Line
Count
Source
1334
11
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
11
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
11
    DB << V;
1338
11
    return *this;
1339
11
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ClassTemplateDecl*>(clang::ClassTemplateDecl* const&) const
Line
Count
Source
1334
59
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
59
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
59
    DB << V;
1338
59
    return *this;
1339
59
  }
SemaDeclCXX.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<(anonymous namespace)::DefaultedComparisonSubobject::$_7>((anonymous namespace)::DefaultedComparisonSubobject::$_7 const&) const
Line
Count
Source
1334
38
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
38
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
38
    DB << V;
1338
38
    return *this;
1339
38
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<TrivialSubobjectKind>(TrivialSubobjectKind const&) const
Line
Count
Source
1334
215
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
215
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
215
    DB << V;
1338
215
    return *this;
1339
215
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::CXXConstructorDecl*>(clang::CXXConstructorDecl* const&) const
Line
Count
Source
1334
7
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
7
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
7
    DB << V;
1338
7
    return *this;
1339
7
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::DecompositionDecl*>(clang::DecompositionDecl* const&) const
Line
Count
Source
1334
7
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
7
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
7
    DB << V;
1338
7
    return *this;
1339
7
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::AccessSpecifier>(clang::AccessSpecifier const&) const
Line
Count
Source
1334
8
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
8
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
8
    DB << V;
1338
8
    return *this;
1339
8
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Attr*>(clang::Attr* const&) const
Line
Count
Source
1334
40
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
40
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
40
    DB << V;
1338
40
    return *this;
1339
40
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::InheritableAttr*>(clang::InheritableAttr* const&) const
Line
Count
Source
1334
24
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
24
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
24
    DB << V;
1338
24
    return *this;
1339
24
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ClassTemplateSpecializationDecl*>(clang::ClassTemplateSpecializationDecl* const&) const
Line
Count
Source
1334
79
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
79
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
79
    DB << V;
1338
79
    return *this;
1339
79
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::FieldDecl*>(clang::FieldDecl* const&) const
Line
Count
Source
1334
602
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
602
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
602
    DB << V;
1338
602
    return *this;
1339
602
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::TemplateDecl*>(clang::TemplateDecl* const&) const
Line
Count
Source
1334
1.15k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
1.15k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
1.15k
    DB << V;
1338
1.15k
    return *this;
1339
1.15k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ObjCMethodDecl*>(clang::ObjCMethodDecl* const&) const
Line
Count
Source
1334
2.64k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
2.64k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
2.64k
    DB << V;
1338
2.64k
    return *this;
1339
2.64k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ObjCInterfaceDecl const*>(clang::ObjCInterfaceDecl const* const&) const
Line
Count
Source
1334
8
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
8
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
8
    DB << V;
1338
8
    return *this;
1339
8
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ObjCCategoryDecl*>(clang::ObjCCategoryDecl* const&) const
Line
Count
Source
1334
5
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
5
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
5
    DB << V;
1338
5
    return *this;
1339
5
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ObjCProtocolDecl const*>(clang::ObjCProtocolDecl const* const&) const
Line
Count
Source
1334
5
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
5
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
5
    DB << V;
1338
5
    return *this;
1339
5
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ObjCMethodFamily>(clang::ObjCMethodFamily const&) const
Line
Count
Source
1334
48
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
48
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
48
    DB << V;
1338
48
    return *this;
1339
48
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ObjCProtocolDecl*>(clang::ObjCProtocolDecl* const&) const
Line
Count
Source
1334
39
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
39
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
39
    DB << V;
1338
39
    return *this;
1339
39
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Selector>(clang::Selector const&) const
Line
Count
Source
1334
3.63k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
3.63k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
3.63k
    DB << V;
1338
3.63k
    return *this;
1339
3.63k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ObjCIvarDecl const*>(clang::ObjCIvarDecl const* const&) const
Line
Count
Source
1334
10
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
10
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
10
    DB << V;
1338
10
    return *this;
1339
10
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ValueDecl const*>(clang::ValueDecl const* const&) const
Line
Count
Source
1334
11.2k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
11.2k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
11.2k
    DB << V;
1338
11.2k
    return *this;
1339
11.2k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::CanQual<clang::Type> >(clang::CanQual<clang::Type> const&) const
Line
Count
Source
1334
91
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
91
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
91
    DB << V;
1338
91
    return *this;
1339
91
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<llvm::SmallString<40u> >(llvm::SmallString<40u> const&) const
Line
Count
Source
1334
9.79k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
9.79k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
9.79k
    DB << V;
1338
9.79k
    return *this;
1339
9.79k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::SourceLocation>(clang::SourceLocation const&) const
Line
Count
Source
1334
577
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
577
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
577
    DB << V;
1338
577
    return *this;
1339
577
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<OriginalExprKind>(OriginalExprKind const&) const
Line
Count
Source
1334
11
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
11
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
11
    DB << V;
1338
11
    return *this;
1339
11
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::TypeAliasTemplateDecl*>(clang::TypeAliasTemplateDecl* const&) const
Line
Count
Source
1334
7
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
7
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
7
    DB << V;
1338
7
    return *this;
1339
7
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::UsingPackDecl*>(clang::UsingPackDecl* const&) const
Line
Count
Source
1334
2
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
2
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
2
    DB << V;
1338
2
    return *this;
1339
2
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Sema::VariadicCallType>(clang::Sema::VariadicCallType const&) const
Line
Count
Source
1334
6
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
6
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
6
    DB << V;
1338
6
    return *this;
1339
6
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Sema::AssignmentAction>(clang::Sema::AssignmentAction const&) const
Line
Count
Source
1334
13
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
13
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
13
    DB << V;
1338
13
    return *this;
1339
13
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Sema::ObjCLiteralKind>(clang::Sema::ObjCLiteralKind const&) const
Line
Count
Source
1334
79
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
79
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
79
    DB << V;
1338
79
    return *this;
1339
79
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ObjCBridgeCastKind>(clang::ObjCBridgeCastKind const&) const
Line
Count
Source
1334
3
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
3
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
3
    DB << V;
1338
3
    return *this;
1339
3
  }
SemaInit.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<(anonymous namespace)::ReferenceKind>((anonymous namespace)::ReferenceKind const&) const
Line
Count
Source
1334
126
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
126
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
126
    DB << V;
1338
126
    return *this;
1339
126
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Qualifiers::ObjCLifetime>(clang::Qualifiers::ObjCLifetime const&) const
Line
Count
Source
1334
251
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
251
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
251
    DB << V;
1338
251
    return *this;
1339
251
  }
SemaObjCProperty.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<SelectPropertyForSynthesisFromProtocols(clang::Sema&, clang::SourceLocation, clang::ObjCInterfaceDecl*, clang::ObjCPropertyDecl*)::MismatchKind>(SelectPropertyForSynthesisFromProtocols(clang::Sema&, clang::SourceLocation, clang::ObjCInterfaceDecl*, clang::ObjCPropertyDecl*)::MismatchKind const&) const
Line
Count
Source
1334
24
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
24
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
24
    DB << V;
1338
24
    return *this;
1339
24
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ObjCPropertyDecl*>(clang::ObjCPropertyDecl* const&) const
Line
Count
Source
1334
31
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
31
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
31
    DB << V;
1338
31
    return *this;
1339
31
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ObjCIvarDecl*>(clang::ObjCIvarDecl* const&) const
Line
Count
Source
1334
46
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
46
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
46
    DB << V;
1338
46
    return *this;
1339
46
  }
SemaOpenMP.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<reportOriginalDsa(clang::Sema&, (anonymous namespace)::DSAStackTy const*, clang::ValueDecl const*, (anonymous namespace)::DSAStackTy::DSAVarData const&, bool)::$_39>(reportOriginalDsa(clang::Sema&, (anonymous namespace)::DSAStackTy const*, clang::ValueDecl const*, (anonymous namespace)::DSAStackTy::DSAVarData const&, bool)::$_39 const&) const
Line
Count
Source
1334
1.08k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
1.08k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
1.08k
    DB << V;
1338
1.08k
    return *this;
1339
1.08k
  }
SemaOpenMP.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<getPrivateItem(clang::Sema&, clang::Expr*&, clang::SourceLocation&, clang::SourceRange&, bool)::$_43>(getPrivateItem(clang::Sema&, clang::Expr*&, clang::SourceLocation&, clang::SourceRange&, bool)::$_43 const&) const
Line
Count
Source
1334
24
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
24
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
24
    DB << V;
1338
24
    return *this;
1339
24
  }
SemaOpenMP.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<checkNestingOfRegions(clang::Sema&, (anonymous namespace)::DSAStackTy const*, llvm::omp::Directive, clang::DeclarationNameInfo const&, llvm::omp::Directive, clang::SourceLocation)::$_42>(checkNestingOfRegions(clang::Sema&, (anonymous namespace)::DSAStackTy const*, llvm::omp::Directive, clang::DeclarationNameInfo const&, llvm::omp::Directive, clang::SourceLocation)::$_42 const&) const
Line
Count
Source
1334
6.15k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
6.15k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
6.15k
    DB << V;
1338
6.15k
    return *this;
1339
6.15k
  }
SemaOpenMP.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<(anonymous namespace)::OpenMPAtomicUpdateChecker::ExprAnalysisErrorCode>((anonymous namespace)::OpenMPAtomicUpdateChecker::ExprAnalysisErrorCode const&) const
Line
Count
Source
1334
800
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
800
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
800
    DB << V;
1338
800
    return *this;
1339
800
  }
SemaOpenMP.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Sema::ActOnOpenMPAtomicDirective(llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, clang::SourceLocation, clang::SourceLocation)::$_20>(clang::Sema::ActOnOpenMPAtomicDirective(llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, clang::SourceLocation, clang::SourceLocation)::$_20 const&) const
Line
Count
Source
1334
72
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
72
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
72
    DB << V;
1338
72
    return *this;
1339
72
  }
SemaOpenMP.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Sema::ActOnOpenMPAtomicDirective(llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, clang::SourceLocation, clang::SourceLocation)::$_21>(clang::Sema::ActOnOpenMPAtomicDirective(llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, clang::SourceLocation, clang::SourceLocation)::$_21 const&) const
Line
Count
Source
1334
48
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
48
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
48
    DB << V;
1338
48
    return *this;
1339
48
  }
SemaOpenMP.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Sema::ActOnOpenMPAtomicDirective(llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, clang::SourceLocation, clang::SourceLocation)::$_22>(clang::Sema::ActOnOpenMPAtomicDirective(llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, clang::SourceLocation, clang::SourceLocation)::$_22 const&) const
Line
Count
Source
1334
72
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
72
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
72
    DB << V;
1338
72
    return *this;
1339
72
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Sema::CCEKind>(clang::Sema::CCEKind const&) const
Line
Count
Source
1334
136
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
136
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
136
    DB << V;
1338
136
    return *this;
1339
136
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Qualifiers>(clang::Qualifiers const&) const
Line
Count
Source
1334
9
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
9
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
9
    DB << V;
1338
9
    return *this;
1339
9
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Sema::CUDAFunctionTarget>(clang::Sema::CUDAFunctionTarget const&) const
Line
Count
Source
1334
407
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
407
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
407
    DB << V;
1338
407
    return *this;
1339
407
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::CXXMethodDecl*>(clang::CXXMethodDecl* const&) const
Line
Count
Source
1334
19
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
19
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
19
    DB << V;
1338
19
    return *this;
1339
19
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::WarnUnusedResultAttr const*>(clang::WarnUnusedResultAttr const* const&) const
Line
Count
Source
1334
121
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
121
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
121
    DB << V;
1338
121
    return *this;
1339
121
  }
SemaStmt.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<(anonymous namespace)::BeginEndFunction>((anonymous namespace)::BeginEndFunction const&) const
Line
Count
Source
1334
40
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
40
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
40
    DB << V;
1338
40
    return *this;
1339
40
  }
SemaStmt.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Sema::checkMustTailAttr(clang::Stmt const*, clang::Attr const&)::FuncType::$_6>(clang::Sema::checkMustTailAttr(clang::Stmt const*, clang::Attr const&)::FuncType::$_6 const&) const
Line
Count
Source
1334
12
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
12
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
12
    DB << V;
1338
12
    return *this;
1339
12
  }
SemaStmtAsm.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<checkExprMemoryConstraintCompat(clang::Sema&, clang::Expr*, clang::TargetInfo::ConstraintInfo&, bool)::$_2>(checkExprMemoryConstraintCompat(clang::Sema&, clang::Expr*, clang::TargetInfo::ConstraintInfo&, bool)::$_2 const&) const
Line
Count
Source
1334
6
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
6
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
6
    DB << V;
1338
6
    return *this;
1339
6
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::LikelyAttr const*>(clang::LikelyAttr const* const&) const
Line
Count
Source
1334
1
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
1
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
1
    DB << V;
1338
1
    return *this;
1339
1
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::UnlikelyAttr const*>(clang::UnlikelyAttr const* const&) const
Line
Count
Source
1334
1
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
1
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
1
    DB << V;
1338
1
    return *this;
1339
1
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::NamespaceDecl*>(clang::NamespaceDecl* const&) const
Line
Count
Source
1334
39
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
39
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
39
    DB << V;
1338
39
    return *this;
1339
39
  }
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::NestedNameSpecifier*>(clang::NestedNameSpecifier* const&) const
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ConceptDecl*>(clang::ConceptDecl* const&) const
Line
Count
Source
1334
4
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
4
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
4
    DB << V;
1338
4
    return *this;
1339
4
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::VarTemplateSpecializationDecl*>(clang::VarTemplateSpecializationDecl* const&) const
Line
Count
Source
1334
3
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
3
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
3
    DB << V;
1338
3
    return *this;
1339
3
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::TemplateTemplateParmDecl*>(clang::TemplateTemplateParmDecl* const&) const
Line
Count
Source
1334
4
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
4
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
4
    DB << V;
1338
4
    return *this;
1339
4
  }
SemaTemplate.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Sema::CheckDependentFunctionTemplateSpecialization(clang::FunctionDecl*, clang::TemplateArgumentListInfo const&, clang::LookupResult&)::DiscardReason>(clang::Sema::CheckDependentFunctionTemplateSpecialization(clang::FunctionDecl*, clang::TemplateArgumentListInfo const&, clang::LookupResult&)::DiscardReason const&) const
Line
Count
Source
1334
4
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
4
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
4
    DB << V;
1338
4
    return *this;
1339
4
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::VarTemplateDecl*>(clang::VarTemplateDecl* const&) const
Line
Count
Source
1334
21
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
21
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
21
    DB << V;
1338
21
    return *this;
1339
21
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::DeducedTemplateArgument>(clang::DeducedTemplateArgument const&) const
Line
Count
Source
1334
19
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
19
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
19
    DB << V;
1338
19
    return *this;
1339
19
  }
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::MSPropertyDecl*>(clang::MSPropertyDecl* const&) const
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ObjCInterfaceDecl*>(clang::ObjCInterfaceDecl* const&) const
Line
Count
Source
1334
5
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
5
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
5
    DB << V;
1338
5
    return *this;
1339
5
  }
SemaType.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<(anonymous namespace)::QualifiedFunctionKind>((anonymous namespace)::QualifiedFunctionKind const&) const
Line
Count
Source
1334
24
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
24
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
24
    DB << V;
1338
24
    return *this;
1339
24
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<TypeDiagSelector>(TypeDiagSelector const&) const
Line
Count
Source
1334
32
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
32
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
32
    DB << V;
1338
32
    return *this;
1339
32
  }
SemaType.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<GetFullTypeForDeclarator((anonymous namespace)::TypeProcessingState&, clang::QualType, clang::TypeSourceInfo*)::$_7>(GetFullTypeForDeclarator((anonymous namespace)::TypeProcessingState&, clang::QualType, clang::TypeSourceInfo*)::$_7 const&) const
Line
Count
Source
1334
50
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
50
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
50
    DB << V;
1338
50
    return *this;
1339
50
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ArrayType::ArraySizeModifier>(clang::ArrayType::ArraySizeModifier const&) const
Line
Count
Source
1334
5
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
5
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
5
    DB << V;
1338
5
    return *this;
1339
5
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<llvm::ArrayRef<clang::SourceRange> >(llvm::ArrayRef<clang::SourceRange> const&) const
Line
Count
Source
1334
20.2k
  template <typename T> const DiagnosticBuilder &operator<<(const T &V) const {
1335
20.2k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1336
0
    const StreamingDiagnostic &DB = *this;
1337
20.2k
    DB << V;
1338
20.2k
    return *this;
1339
20.2k
  }
1340
1341
  // It is necessary to limit this to rvalue reference to avoid calling this
1342
  // function with a bitfield lvalue argument since non-const reference to
1343
  // bitfield is not allowed.
1344
  template <typename T, typename = typename std::enable_if<
1345
                            !std::is_lvalue_reference<T>::value>::type>
1346
2.94M
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
2.94M
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
2.94M
    DB << std::move(V);
1350
2.94M
    return *this;
1351
2.94M
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::comments::CommandMarkerKind, void>(clang::comments::CommandMarkerKind&&) const
Line
Count
Source
1346
493
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
493
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
493
    DB << std::move(V);
1350
493
    return *this;
1351
493
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<unsigned int, void>(unsigned int&&) const
Line
Count
Source
1346
38.5k
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
38.5k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
38.5k
    DB << std::move(V);
1350
38.5k
    return *this;
1351
38.5k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::QualType, void>(clang::QualType&&) const
Line
Count
Source
1346
107k
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
107k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
107k
    DB << std::move(V);
1350
107k
    return *this;
1351
107k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::IdentifierInfo*, void>(clang::IdentifierInfo*&&) const
Line
Count
Source
1346
157k
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
157k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
157k
    DB << std::move(V);
1350
157k
    return *this;
1351
157k
  }
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::VTableComponent::Kind, void>(clang::VTableComponent::Kind&&) const
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<llvm::Error, void>(llvm::Error&&) const
Line
Count
Source
1346
6
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
6
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
6
    DB << std::move(V);
1350
6
    return *this;
1351
6
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::SourceRange, void>(clang::SourceRange&&) const
Line
Count
Source
1346
1.05M
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
1.05M
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
1.05M
    DB << std::move(V);
1350
1.05M
    return *this;
1351
1.05M
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<char const*, void>(char const*&&) const
Line
Count
Source
1346
14.5k
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
14.5k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
14.5k
    DB << std::move(V);
1350
14.5k
    return *this;
1351
14.5k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<llvm::StringRef const, void>(llvm::StringRef const&&) const
Line
Count
Source
1346
6
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
6
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
6
    DB << std::move(V);
1350
6
    return *this;
1351
6
  }
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::DiagnosticOptions::'unnamed', void>(clang::DiagnosticOptions::'unnamed'&&) const
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, void>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&) const
Line
Count
Source
1346
165k
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
165k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
165k
    DB << std::move(V);
1350
165k
    return *this;
1351
165k
  }
Lexer.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<maybeDiagnoseIDCharCompat(clang::DiagnosticsEngine&, unsigned int, clang::CharSourceRange, bool)::$_0, void>(maybeDiagnoseIDCharCompat(clang::DiagnosticsEngine&, unsigned int, clang::CharSourceRange, bool)::$_0&&) const
Line
Count
Source
1346
7
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
7
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
7
    DB << std::move(V);
1350
7
    return *this;
1351
7
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<llvm::StringRef, void>(llvm::StringRef&&) const
Line
Count
Source
1346
117k
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
117k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
117k
    DB << std::move(V);
1350
117k
    return *this;
1351
117k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<int, void>(int&&) const
Line
Count
Source
1346
619k
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
619k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
619k
    DB << std::move(V);
1350
619k
    return *this;
1351
619k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::FixItHint, void>(clang::FixItHint&&) const
Line
Count
Source
1346
474k
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
474k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
474k
    DB << std::move(V);
1350
474k
    return *this;
1351
474k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::CharSourceRange, void>(clang::CharSourceRange&&) const
Line
Count
Source
1346
373
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
373
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
373
    DB << std::move(V);
1350
373
    return *this;
1351
373
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<PPElifDiag, void>(PPElifDiag&&) const
Line
Count
Source
1346
1
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
1
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
1
    DB << std::move(V);
1350
1
    return *this;
1351
1
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<bool, void>(bool&&) const
Line
Count
Source
1346
87.8k
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
87.8k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
87.8k
    DB << std::move(V);
1350
87.8k
    return *this;
1351
87.8k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::SourceLocation, void>(clang::SourceLocation&&) const
Line
Count
Source
1346
343
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
343
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
343
    DB << std::move(V);
1350
343
    return *this;
1351
343
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::tok::TokenKind, void>(clang::tok::TokenKind&&) const
Line
Count
Source
1346
887
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
887
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
887
    DB << std::move(V);
1350
887
    return *this;
1351
887
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, void>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&&) const
Line
Count
Source
1346
7
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
7
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
7
    DB << std::move(V);
1350
7
    return *this;
1351
7
  }
ASTReader.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ASTReader::diagnoseOdrViolations()::$_10, void>(clang::ASTReader::diagnoseOdrViolations()::$_10&&) const
Line
Count
Source
1346
6
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
6
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
6
    DB << std::move(V);
1350
6
    return *this;
1351
6
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::DeclarationName, void>(clang::DeclarationName&&) const
Line
Count
Source
1346
96.7k
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
96.7k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
96.7k
    DB << std::move(V);
1350
96.7k
    return *this;
1351
96.7k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Sema::ObjCContainerKind, void>(clang::Sema::ObjCContainerKind&&) const
Line
Count
Source
1346
37
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
37
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
37
    DB << std::move(V);
1350
37
    return *this;
1351
37
  }
ParseOpenMP.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<(anonymous namespace)::OMPContextLvl, void>((anonymous namespace)::OMPContextLvl&&) const
Line
Count
Source
1346
598
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
598
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
598
    DB << std::move(V);
1350
598
    return *this;
1351
598
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::AttributeDeclKind, void>(clang::AttributeDeclKind&&) const
Line
Count
Source
1346
69
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
69
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
69
    DB << std::move(V);
1350
69
    return *this;
1351
69
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<CastType, void>(CastType&&) const
Line
Count
Source
1346
138
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
138
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
138
    DB << std::move(V);
1350
138
    return *this;
1351
138
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Expr*, void>(clang::Expr*&&) const
Line
Count
Source
1346
59
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
59
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
59
    DB << std::move(V);
1350
59
    return *this;
1351
59
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Sema::AssignmentAction, void>(clang::Sema::AssignmentAction&&) const
Line
Count
Source
1346
114
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
114
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
114
    DB << std::move(V);
1350
114
    return *this;
1351
114
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ConceptDecl*, void>(clang::ConceptDecl*&&) const
Line
Count
Source
1346
54
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
54
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
54
    DB << std::move(V);
1350
54
    return *this;
1351
54
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::VarDecl*, void>(clang::VarDecl*&&) const
Line
Count
Source
1346
516
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
516
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
516
    DB << std::move(V);
1350
516
    return *this;
1351
516
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Attr const*, void>(clang::Attr const*&&) const
Line
Count
Source
1346
841
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
841
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
841
    DB << std::move(V);
1350
841
    return *this;
1351
841
  }
SemaDecl.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<CheckMultiVersionValue(clang::Sema&, clang::FunctionDecl const*)::ErrType, void>(CheckMultiVersionValue(clang::Sema&, clang::FunctionDecl const*)::ErrType&&) const
Line
Count
Source
1346
1
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
1
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
1
    DB << std::move(V);
1350
1
    return *this;
1351
1
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::NestedNameSpecifier*, void>(clang::NestedNameSpecifier*&&) const
Line
Count
Source
1346
377
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
377
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
377
    DB << std::move(V);
1350
377
    return *this;
1351
377
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::RecordDecl const*, void>(clang::RecordDecl const*&&) const
Line
Count
Source
1346
4
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
4
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
4
    DB << std::move(V);
1350
4
    return *this;
1351
4
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::DeclContext*, void>(clang::DeclContext*&&) const
Line
Count
Source
1346
92
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
92
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
92
    DB << std::move(V);
1350
92
    return *this;
1351
92
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<ShadowedDeclKind, void>(ShadowedDeclKind&&) const
Line
Count
Source
1346
48
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
48
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
48
    DB << std::move(V);
1350
48
    return *this;
1351
48
  }
SemaDecl.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Sema::areMultiversionVariantFunctionsCompatible(clang::FunctionDecl const*, clang::FunctionDecl const*, clang::PartialDiagnostic const&, std::__1::pair<clang::SourceLocation, clang::PartialDiagnostic> const&, std::__1::pair<clang::SourceLocation, clang::PartialDiagnostic> const&, std::__1::pair<clang::SourceLocation, clang::PartialDiagnostic> const&, bool, bool, bool)::DoesntSupport, void>(clang::Sema::areMultiversionVariantFunctionsCompatible(clang::FunctionDecl const*, clang::FunctionDecl const*, clang::PartialDiagnostic const&, std::__1::pair<clang::SourceLocation, clang::PartialDiagnostic> const&, std::__1::pair<clang::SourceLocation, clang::PartialDiagnostic> const&, std::__1::pair<clang::SourceLocation, clang::PartialDiagnostic> const&, bool, bool, bool)::DoesntSupport&&) const
Line
Count
Source
1346
23
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
23
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
23
    DB << std::move(V);
1350
23
    return *this;
1351
23
  }
SemaDecl.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Sema::areMultiversionVariantFunctionsCompatible(clang::FunctionDecl const*, clang::FunctionDecl const*, clang::PartialDiagnostic const&, std::__1::pair<clang::SourceLocation, clang::PartialDiagnostic> const&, std::__1::pair<clang::SourceLocation, clang::PartialDiagnostic> const&, std::__1::pair<clang::SourceLocation, clang::PartialDiagnostic> const&, bool, bool, bool)::Different, void>(clang::Sema::areMultiversionVariantFunctionsCompatible(clang::FunctionDecl const*, clang::FunctionDecl const*, clang::PartialDiagnostic const&, std::__1::pair<clang::SourceLocation, clang::PartialDiagnostic> const&, std::__1::pair<clang::SourceLocation, clang::PartialDiagnostic> const&, std::__1::pair<clang::SourceLocation, clang::PartialDiagnostic> const&, bool, bool, bool)::Different&&) const
Line
Count
Source
1346
27
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
27
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
27
    DB << std::move(V);
1350
27
    return *this;
1351
27
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::NamedDecl const*, void>(clang::NamedDecl const*&&) const
Line
Count
Source
1346
44
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
44
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
44
    DB << std::move(V);
1350
44
    return *this;
1351
44
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::CUDALaunchBoundsAttr const*, void>(clang::CUDALaunchBoundsAttr const*&&) const
Line
Count
Source
1346
7
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
7
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
7
    DB << std::move(V);
1350
7
    return *this;
1351
7
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::AMDGPUFlatWorkGroupSizeAttr const*, void>(clang::AMDGPUFlatWorkGroupSizeAttr const*&&) const
Line
Count
Source
1346
11
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
11
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
11
    DB << std::move(V);
1350
11
    return *this;
1351
11
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::AMDGPUWavesPerEUAttr const*, void>(clang::AMDGPUWavesPerEUAttr const*&&) const
Line
Count
Source
1346
11
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
11
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
11
    DB << std::move(V);
1350
11
    return *this;
1351
11
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ParsedAttr const*, void>(clang::ParsedAttr const*&&) const
Line
Count
Source
1346
83
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
83
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
83
    DB << std::move(V);
1350
83
    return *this;
1351
83
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<AttributeLangSupport::LANG, void>(AttributeLangSupport::LANG&&) const
Line
Count
Source
1346
3
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
3
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
3
    DB << std::move(V);
1350
3
    return *this;
1351
3
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::TypedefNameDecl*, void>(clang::TypedefNameDecl*&&) const
Line
Count
Source
1346
30
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
30
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
30
    DB << std::move(V);
1350
30
    return *this;
1351
30
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::AssumeAlignedAttr*, void>(clang::AssumeAlignedAttr*&&) const
Line
Count
Source
1346
3
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
3
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
3
    DB << std::move(V);
1350
3
    return *this;
1351
3
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::AllocAlignAttr*, void>(clang::AllocAlignAttr*&&) const
Line
Count
Source
1346
5
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
5
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
5
    DB << std::move(V);
1350
5
    return *this;
1351
5
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::AllocAlignAttr const*, void>(clang::AllocAlignAttr const*&&) const
Line
Count
Source
1346
5
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
5
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
5
    DB << std::move(V);
1350
5
    return *this;
1351
5
  }
SemaDeclAttr.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Sema::checkTargetAttr(clang::SourceLocation, llvm::StringRef)::FirstParam, void>(clang::Sema::checkTargetAttr(clang::SourceLocation, llvm::StringRef)::FirstParam&&) const
Line
Count
Source
1346
13
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
13
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
13
    DB << std::move(V);
1350
13
    return *this;
1351
13
  }
SemaDeclAttr.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Sema::checkTargetAttr(clang::SourceLocation, llvm::StringRef)::SecondParam, void>(clang::Sema::checkTargetAttr(clang::SourceLocation, llvm::StringRef)::SecondParam&&) const
Line
Count
Source
1346
13
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
13
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
13
    DB << std::move(V);
1350
13
    return *this;
1351
13
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::AlignValueAttr*, void>(clang::AlignValueAttr*&&) const
Line
Count
Source
1346
1
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
1
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
1
    DB << std::move(V);
1350
1
    return *this;
1351
1
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::AlignedAttr*, void>(clang::AlignedAttr*&&) const
Line
Count
Source
1346
18
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
18
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
18
    DB << std::move(V);
1350
18
    return *this;
1351
18
  }
Unexecuted instantiation: clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::InternalLinkageAttr const*, void>(clang::InternalLinkageAttr const*&&) const
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::SwiftNameAttr const*, void>(clang::SwiftNameAttr const*&&) const
Line
Count
Source
1346
1
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
1
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
1
    DB << std::move(V);
1350
1
    return *this;
1351
1
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::FieldDecl*, void>(clang::FieldDecl*&&) const
Line
Count
Source
1346
384
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
384
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
384
    DB << std::move(V);
1350
384
    return *this;
1351
384
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::AccessSpecifier, void>(clang::AccessSpecifier&&) const
Line
Count
Source
1346
8
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
8
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
8
    DB << std::move(V);
1350
8
    return *this;
1351
8
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::NamespaceDecl*, void>(clang::NamespaceDecl*&&) const
Line
Count
Source
1346
1
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
1
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
1
    DB << std::move(V);
1350
1
    return *this;
1351
1
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::CanQual<clang::Type>, void>(clang::CanQual<clang::Type>&&) const
Line
Count
Source
1346
11
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
11
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
11
    DB << std::move(V);
1350
11
    return *this;
1351
11
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<std::__1::pair<clang::NullabilityKind, bool>, void>(std::__1::pair<clang::NullabilityKind, bool>&&) const
Line
Count
Source
1346
144
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
144
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
144
    DB << std::move(V);
1350
144
    return *this;
1351
144
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::TagTypeKind, void>(clang::TagTypeKind&&) const
Line
Count
Source
1346
246
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
246
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
246
    DB << std::move(V);
1350
246
    return *this;
1351
246
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ObjCMethodDecl const*, void>(clang::ObjCMethodDecl const*&&) const
Line
Count
Source
1346
2
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
2
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
2
    DB << std::move(V);
1350
2
    return *this;
1351
2
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Selector, void>(clang::Selector&&) const
Line
Count
Source
1346
170
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
170
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
170
    DB << std::move(V);
1350
170
    return *this;
1351
170
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::IdentifierInfo const*, void>(clang::IdentifierInfo const*&&) const
Line
Count
Source
1346
140
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
140
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
140
    DB << std::move(V);
1350
140
    return *this;
1351
140
  }
SemaExpr.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<$_14, void>($_14&&) const
Line
Count
Source
1346
344
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
344
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
344
    DB << std::move(V);
1350
344
    return *this;
1351
344
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Sema::NonTagKind, void>(clang::Sema::NonTagKind&&) const
Line
Count
Source
1346
7
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
7
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
7
    DB << std::move(V);
1350
7
    return *this;
1351
7
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ValueDecl const*, void>(clang::ValueDecl const*&&) const
Line
Count
Source
1346
64
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
64
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
64
    DB << std::move(V);
1350
64
    return *this;
1351
64
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ValueDecl*, void>(clang::ValueDecl*&&) const
Line
Count
Source
1346
242
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
242
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
242
    DB << std::move(V);
1350
242
    return *this;
1351
242
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Qualifiers, void>(clang::Qualifiers&&) const
Line
Count
Source
1346
72
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
72
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
72
    DB << std::move(V);
1350
72
    return *this;
1351
72
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::QualType const, void>(clang::QualType const&&) const
Line
Count
Source
1346
42
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
42
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
42
    DB << std::move(V);
1350
42
    return *this;
1351
42
  }
SemaOpenMP.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Sema::checkOpenMPDeclareVariantFunction(clang::OpaquePtr<clang::DeclGroupRef>, clang::Expr*, clang::OMPTraitInfo&, clang::SourceRange)::DoesntSupport, void>(clang::Sema::checkOpenMPDeclareVariantFunction(clang::OpaquePtr<clang::DeclGroupRef>, clang::Expr*, clang::OMPTraitInfo&, clang::SourceRange)::DoesntSupport&&) const
Line
Count
Source
1346
10
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
10
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
10
    DB << std::move(V);
1350
10
    return *this;
1351
10
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::CXXRecordDecl*, void>(clang::CXXRecordDecl*&&) const
Line
Count
Source
1346
664
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
664
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
664
    DB << std::move(V);
1350
664
    return *this;
1351
664
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::ParmVarDecl*, void>(clang::ParmVarDecl*&&) const
Line
Count
Source
1346
383
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
383
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
383
    DB << std::move(V);
1350
383
    return *this;
1351
383
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::LangAS, void>(clang::LangAS&&) const
Line
Count
Source
1346
82
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
82
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
82
    DB << std::move(V);
1350
82
    return *this;
1351
82
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Qualifiers::ObjCLifetime, void>(clang::Qualifiers::ObjCLifetime&&) const
Line
Count
Source
1346
34
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
34
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
34
    DB << std::move(V);
1350
34
    return *this;
1351
34
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Qualifiers::GC, void>(clang::Qualifiers::GC&&) const
Line
Count
Source
1346
4
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
4
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
4
    DB << std::move(V);
1350
4
    return *this;
1351
4
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::TemplateDecl*, void>(clang::TemplateDecl*&&) const
Line
Count
Source
1346
6
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
6
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
6
    DB << std::move(V);
1350
6
    return *this;
1351
6
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::RefQualifierKind, void>(clang::RefQualifierKind&&) const
Line
Count
Source
1346
22
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
22
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
22
    DB << std::move(V);
1350
22
    return *this;
1351
22
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::NamedDecl*, void>(clang::NamedDecl*&&) const
Line
Count
Source
1346
490
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
490
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
490
    DB << std::move(V);
1350
490
    return *this;
1351
490
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Sema::CXXSpecialMember, void>(clang::Sema::CXXSpecialMember&&) const
Line
Count
Source
1346
1.06k
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
1.06k
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
1.06k
    DB << std::move(V);
1350
1.06k
    return *this;
1351
1.06k
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::CXXRecordDecl const*, void>(clang::CXXRecordDecl const*&&) const
Line
Count
Source
1346
52
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
52
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
52
    DB << std::move(V);
1350
52
    return *this;
1351
52
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::MSPropertyDecl*, void>(clang::MSPropertyDecl*&&) const
Line
Count
Source
1346
25
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
25
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
25
    DB << std::move(V);
1350
25
    return *this;
1351
25
  }
SemaStmt.cpp:clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<(anonymous namespace)::BeginEndFunction, void>((anonymous namespace)::BeginEndFunction&&) const
Line
Count
Source
1346
6
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
6
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
6
    DB << std::move(V);
1350
6
    return *this;
1351
6
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::TypeAliasTemplateDecl*, void>(clang::TypeAliasTemplateDecl*&&) const
Line
Count
Source
1346
14
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
14
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
14
    DB << std::move(V);
1350
14
    return *this;
1351
14
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::FunctionDecl*, void>(clang::FunctionDecl*&&) const
Line
Count
Source
1346
303
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
303
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
303
    DB << std::move(V);
1350
303
    return *this;
1351
303
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::BindingDecl*, void>(clang::BindingDecl*&&) const
Line
Count
Source
1346
10
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
10
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
10
    DB << std::move(V);
1350
10
    return *this;
1351
10
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<TypeDiagSelector, void>(TypeDiagSelector&&) const
Line
Count
Source
1346
25
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
25
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
25
    DB << std::move(V);
1350
25
    return *this;
1351
25
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<llvm::IntegerType::'unnamed', void>(llvm::IntegerType::'unnamed'&&) const
Line
Count
Source
1346
2
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
2
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
2
    DB << std::move(V);
1350
2
    return *this;
1351
2
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::Sema::CUDAFunctionTarget, void>(clang::Sema::CUDAFunctionTarget&&) const
Line
Count
Source
1346
215
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
215
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
215
    DB << std::move(V);
1350
215
    return *this;
1351
215
  }
clang::DiagnosticBuilder const& clang::DiagnosticBuilder::operator<<<clang::AttributeArgumentNType, void>(clang::AttributeArgumentNType&&) const
Line
Count
Source
1346
167
  const DiagnosticBuilder &operator<<(T &&V) const {
1347
167
    assert(isActive() && "Clients must not add to cleared diagnostic!");
1348
0
    const StreamingDiagnostic &DB = *this;
1349
167
    DB << std::move(V);
1350
167
    return *this;
1351
167
  }
1352
1353
  DiagnosticBuilder &operator=(const DiagnosticBuilder &) = delete;
1354
1355
  /// Emits the diagnostic.
1356
13.4M
  ~DiagnosticBuilder() { Emit(); }
1357
1358
  /// Forces the diagnostic to be emitted.
1359
128
  const DiagnosticBuilder &setForceEmit() const {
1360
128
    IsForceEmit = true;
1361
128
    return *this;
1362
128
  }
1363
1364
2.55k
  void addFlagValue(StringRef V) const { DiagObj->FlagValue = std::string(V); }
1365
};
1366
1367
struct AddFlagValue {
1368
  StringRef Val;
1369
1370
2.55k
  explicit AddFlagValue(StringRef V) : Val(V) {}
1371
};
1372
1373
/// Register a value for the flag in the current diagnostic. This
1374
/// value will be shown as the suffix "=value" after the flag name. It is
1375
/// useful in cases where the diagnostic flag accepts values (e.g.,
1376
/// -Rpass or -Wframe-larger-than).
1377
inline const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB,
1378
2.55k
                                           const AddFlagValue V) {
1379
2.55k
  DB.addFlagValue(V.Val);
1380
2.55k
  return DB;
1381
2.55k
}
1382
1383
inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB,
1384
526k
                                             StringRef S) {
1385
526k
  DB.AddString(S);
1386
526k
  return DB;
1387
526k
}
1388
1389
inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB,
1390
62.5k
                                             const char *Str) {
1391
62.5k
  DB.AddTaggedVal(reinterpret_cast<intptr_t>(Str),
1392
62.5k
                  DiagnosticsEngine::ak_c_string);
1393
62.5k
  return DB;
1394
62.5k
}
1395
1396
inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB,
1397
787k
                                             int I) {
1398
787k
  DB.AddTaggedVal(I, DiagnosticsEngine::ak_sint);
1399
787k
  return DB;
1400
787k
}
1401
1402
// We use enable_if here to prevent that this overload is selected for
1403
// pointers or other arguments that are implicitly convertible to bool.
1404
template <typename T>
1405
inline std::enable_if_t<std::is_same<T, bool>::value,
1406
                        const StreamingDiagnostic &>
1407
404k
operator<<(const StreamingDiagnostic &DB, T I) {
1408
404k
  DB.AddTaggedVal(I, DiagnosticsEngine::ak_sint);
1409
404k
  return DB;
1410
404k
}
1411
1412
inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB,
1413
198k
                                             unsigned I) {
1414
198k
  DB.AddTaggedVal(I, DiagnosticsEngine::ak_uint);
1415
198k
  return DB;
1416
198k
}
1417
1418
inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB,
1419
43.8k
                                             tok::TokenKind I) {
1420
43.8k
  DB.AddTaggedVal(static_cast<unsigned>(I), DiagnosticsEngine::ak_tokenkind);
1421
43.8k
  return DB;
1422
43.8k
}
1423
1424
inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB,
1425
248k
                                             const IdentifierInfo *II) {
1426
248k
  DB.AddTaggedVal(reinterpret_cast<intptr_t>(II),
1427
248k
                  DiagnosticsEngine::ak_identifierinfo);
1428
248k
  return DB;
1429
248k
}
1430
1431
// Adds a DeclContext to the diagnostic. The enable_if template magic is here
1432
// so that we only match those arguments that are (statically) DeclContexts;
1433
// other arguments that derive from DeclContext (e.g., RecordDecls) will not
1434
// match.
1435
template <typename T>
1436
inline std::enable_if_t<
1437
    std::is_same<std::remove_const_t<T>, DeclContext>::value,
1438
    const StreamingDiagnostic &>
1439
51.6k
operator<<(const StreamingDiagnostic &DB, T *DC) {
1440
51.6k
  DB.AddTaggedVal(reinterpret_cast<intptr_t>(DC),
1441
51.6k
                  DiagnosticsEngine::ak_declcontext);
1442
51.6k
  return DB;
1443
51.6k
}
std::__1::enable_if<std::is_same<std::__1::remove_const<clang::DeclContext>::type, clang::DeclContext>::value, clang::StreamingDiagnostic const&>::type clang::operator<<<clang::DeclContext>(clang::StreamingDiagnostic const&, clang::DeclContext*)
Line
Count
Source
1439
51.6k
operator<<(const StreamingDiagnostic &DB, T *DC) {
1440
51.6k
  DB.AddTaggedVal(reinterpret_cast<intptr_t>(DC),
1441
51.6k
                  DiagnosticsEngine::ak_declcontext);
1442
51.6k
  return DB;
1443
51.6k
}
std::__1::enable_if<std::is_same<std::__1::remove_const<clang::DeclContext const>::type, clang::DeclContext>::value, clang::StreamingDiagnostic const&>::type clang::operator<<<clang::DeclContext const>(clang::StreamingDiagnostic const&, clang::DeclContext const*)
Line
Count
Source
1439
52
operator<<(const StreamingDiagnostic &DB, T *DC) {
1440
52
  DB.AddTaggedVal(reinterpret_cast<intptr_t>(DC),
1441
52
                  DiagnosticsEngine::ak_declcontext);
1442
52
  return DB;
1443
52
}
1444
1445
inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB,
1446
1.42M
                                             SourceRange R) {
1447
1.42M
  DB.AddSourceRange(CharSourceRange::getTokenRange(R));
1448
1.42M
  return DB;
1449
1.42M
}
1450
1451
inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB,
1452
20.2k
                                             ArrayRef<SourceRange> Ranges) {
1453
20.2k
  for (SourceRange R : Ranges)
1454
30.6k
    DB.AddSourceRange(CharSourceRange::getTokenRange(R));
1455
20.2k
  return DB;
1456
20.2k
}
1457
1458
inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB,
1459
9.45k
                                             const CharSourceRange &R) {
1460
9.45k
  DB.AddSourceRange(R);
1461
9.45k
  return DB;
1462
9.45k
}
1463
1464
inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB,
1465
536k
                                             const FixItHint &Hint) {
1466
536k
  DB.AddFixItHint(Hint);
1467
536k
  return DB;
1468
536k
}
1469
1470
inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB,
1471
58.7k
                                             ArrayRef<FixItHint> Hints) {
1472
58.7k
  for (const FixItHint &Hint : Hints)
1473
1.35k
    DB.AddFixItHint(Hint);
1474
58.7k
  return DB;
1475
58.7k
}
1476
1477
inline const StreamingDiagnostic &
1478
operator<<(const StreamingDiagnostic &DB,
1479
0
           const llvm::Optional<SourceRange> &Opt) {
1480
0
  if (Opt)
1481
0
    DB << *Opt;
1482
0
  return DB;
1483
0
}
1484
1485
inline const StreamingDiagnostic &
1486
operator<<(const StreamingDiagnostic &DB,
1487
0
           const llvm::Optional<CharSourceRange> &Opt) {
1488
0
  if (Opt)
1489
0
    DB << *Opt;
1490
0
  return DB;
1491
0
}
1492
1493
inline const StreamingDiagnostic &
1494
operator<<(const StreamingDiagnostic &DB,
1495
0
           const llvm::Optional<FixItHint> &Opt) {
1496
0
  if (Opt)
1497
0
    DB << *Opt;
1498
0
  return DB;
1499
0
}
1500
1501
/// A nullability kind paired with a bit indicating whether it used a
1502
/// context-sensitive keyword.
1503
using DiagNullabilityKind = std::pair<NullabilityKind, bool>;
1504
1505
const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB,
1506
                                      DiagNullabilityKind nullability);
1507
1508
inline DiagnosticBuilder DiagnosticsEngine::Report(SourceLocation Loc,
1509
7.12M
                                                   unsigned DiagID) {
1510
7.12M
  assert(CurDiagID == std::numeric_limits<unsigned>::max() &&
1511
7.12M
         "Multiple diagnostics in flight at once!");
1512
0
  CurDiagLoc = Loc;
1513
7.12M
  CurDiagID = DiagID;
1514
7.12M
  FlagValue.clear();
1515
7.12M
  return DiagnosticBuilder(this);
1516
7.12M
}
1517
1518
const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB,
1519
                                      llvm::Error &&E);
1520
1521
147k
inline DiagnosticBuilder DiagnosticsEngine::Report(unsigned DiagID) {
1522
147k
  return Report(SourceLocation(), DiagID);
1523
147k
}
1524
1525
//===----------------------------------------------------------------------===//
1526
// Diagnostic
1527
//===----------------------------------------------------------------------===//
1528
1529
/// A little helper class (which is basically a smart pointer that forwards
1530
/// info from DiagnosticsEngine) that allows clients to enquire about the
1531
/// currently in-flight diagnostic.
1532
class Diagnostic {
1533
  const DiagnosticsEngine *DiagObj;
1534
  StringRef StoredDiagMessage;
1535
1536
public:
1537
7.51M
  explicit Diagnostic(const DiagnosticsEngine *DO) : DiagObj(DO) {}
1538
  Diagnostic(const DiagnosticsEngine *DO, StringRef storedDiagMessage)
1539
150
      : DiagObj(DO), StoredDiagMessage(storedDiagMessage) {}
1540
1541
658k
  const DiagnosticsEngine *getDiags() const { return DiagObj; }
1542
7.60M
  unsigned getID() const { return DiagObj->CurDiagID; }
1543
7.93M
  const SourceLocation &getLocation() const { return DiagObj->CurDiagLoc; }
1544
415k
  bool hasSourceManager() const { return DiagObj->hasSourceManager(); }
1545
777k
  SourceManager &getSourceManager() const { return DiagObj->getSourceManager();}
1546
1547
4.99M
  unsigned getNumArgs() const { return DiagObj->DiagStorage.NumDiagArgs; }
1548
1549
  /// Return the kind of the specified index.
1550
  ///
1551
  /// Based on the kind of argument, the accessors below can be used to get
1552
  /// the value.
1553
  ///
1554
  /// \pre Idx < getNumArgs()
1555
4.23M
  DiagnosticsEngine::ArgumentKind getArgKind(unsigned Idx) const {
1556
4.23M
    assert(Idx < getNumArgs() && "Argument index out of range!");
1557
0
    return (DiagnosticsEngine::ArgumentKind)
1558
4.23M
        DiagObj->DiagStorage.DiagArgumentsKind[Idx];
1559
4.23M
  }
1560
1561
  /// Return the provided argument string specified by \p Idx.
1562
  /// \pre getArgKind(Idx) == DiagnosticsEngine::ak_std_string
1563
300k
  const std::string &getArgStdStr(unsigned Idx) const {
1564
300k
    assert(getArgKind(Idx) == DiagnosticsEngine::ak_std_string &&
1565
300k
           "invalid argument accessor!");
1566
0
    return DiagObj->DiagStorage.DiagArgumentsStr[Idx];
1567
300k
  }
1568
1569
  /// Return the specified C string argument.
1570
  /// \pre getArgKind(Idx) == DiagnosticsEngine::ak_c_string
1571
16.6k
  const char *getArgCStr(unsigned Idx) const {
1572
16.6k
    assert(getArgKind(Idx) == DiagnosticsEngine::ak_c_string &&
1573
16.6k
           "invalid argument accessor!");
1574
0
    return reinterpret_cast<const char *>(
1575
16.6k
        DiagObj->DiagStorage.DiagArgumentsVal[Idx]);
1576
16.6k
  }
1577
1578
  /// Return the specified signed integer argument.
1579
  /// \pre getArgKind(Idx) == DiagnosticsEngine::ak_sint
1580
122k
  int getArgSInt(unsigned Idx) const {
1581
122k
    assert(getArgKind(Idx) == DiagnosticsEngine::ak_sint &&
1582
122k
           "invalid argument accessor!");
1583
0
    return (int)DiagObj->DiagStorage.DiagArgumentsVal[Idx];
1584
122k
  }
1585
1586
  /// Return the specified unsigned integer argument.
1587
  /// \pre getArgKind(Idx) == DiagnosticsEngine::ak_uint
1588
88.6k
  unsigned getArgUInt(unsigned Idx) const {
1589
88.6k
    assert(getArgKind(Idx) == DiagnosticsEngine::ak_uint &&
1590
88.6k
           "invalid argument accessor!");
1591
0
    return (unsigned)DiagObj->DiagStorage.DiagArgumentsVal[Idx];
1592
88.6k
  }
1593
1594
  /// Return the specified IdentifierInfo argument.
1595
  /// \pre getArgKind(Idx) == DiagnosticsEngine::ak_identifierinfo
1596
14.3k
  const IdentifierInfo *getArgIdentifier(unsigned Idx) const {
1597
14.3k
    assert(getArgKind(Idx) == DiagnosticsEngine::ak_identifierinfo &&
1598
14.3k
           "invalid argument accessor!");
1599
0
    return reinterpret_cast<IdentifierInfo *>(
1600
14.3k
        DiagObj->DiagStorage.DiagArgumentsVal[Idx]);
1601
14.3k
  }
1602
1603
  /// Return the specified non-string argument in an opaque form.
1604
  /// \pre getArgKind(Idx) != DiagnosticsEngine::ak_std_string
1605
1.11M
  intptr_t getRawArg(unsigned Idx) const {
1606
1.11M
    assert(getArgKind(Idx) != DiagnosticsEngine::ak_std_string &&
1607
1.11M
           "invalid argument accessor!");
1608
0
    return DiagObj->DiagStorage.DiagArgumentsVal[Idx];
1609
1.11M
  }
1610
1611
  /// Return the number of source ranges associated with this diagnostic.
1612
248k
  unsigned getNumRanges() const {
1613
248k
    return DiagObj->DiagStorage.DiagRanges.size();
1614
248k
  }
1615
1616
  /// \pre Idx < getNumRanges()
1617
121k
  const CharSourceRange &getRange(unsigned Idx) const {
1618
121k
    assert(Idx < getNumRanges() && "Invalid diagnostic range index!");
1619
0
    return DiagObj->DiagStorage.DiagRanges[Idx];
1620
121k
  }
1621
1622
  /// Return an array reference for this diagnostic's ranges.
1623
54.0k
  ArrayRef<CharSourceRange> getRanges() const {
1624
54.0k
    return DiagObj->DiagStorage.DiagRanges;
1625
54.0k
  }
1626
1627
129k
  unsigned getNumFixItHints() const {
1628
129k
    return DiagObj->DiagStorage.FixItHints.size();
1629
129k
  }
1630
1631
1.04k
  const FixItHint &getFixItHint(unsigned Idx) const {
1632
1.04k
    assert(Idx < getNumFixItHints() && "Invalid index!");
1633
0
    return DiagObj->DiagStorage.FixItHints[Idx];
1634
1.04k
  }
1635
1636
63.2k
  ArrayRef<FixItHint> getFixItHints() const {
1637
63.2k
    return DiagObj->DiagStorage.FixItHints;
1638
63.2k
  }
1639
1640
  /// Format this diagnostic into a string, substituting the
1641
  /// formal arguments into the %0 slots.
1642
  ///
1643
  /// The result is appended onto the \p OutStr array.
1644
  void FormatDiagnostic(SmallVectorImpl<char> &OutStr) const;
1645
1646
  /// Format the given format-string into the output buffer using the
1647
  /// arguments stored in this diagnostic.
1648
  void FormatDiagnostic(const char *DiagStr, const char *DiagEnd,
1649
                        SmallVectorImpl<char> &OutStr) const;
1650
};
1651
1652
/**
1653
 * Represents a diagnostic in a form that can be retained until its
1654
 * corresponding source manager is destroyed.
1655
 */
1656
class StoredDiagnostic {
1657
  unsigned ID;
1658
  DiagnosticsEngine::Level Level;
1659
  FullSourceLoc Loc;
1660
  std::string Message;
1661
  std::vector<CharSourceRange> Ranges;
1662
  std::vector<FixItHint> FixIts;
1663
1664
public:
1665
  StoredDiagnostic() = default;
1666
  StoredDiagnostic(DiagnosticsEngine::Level Level, const Diagnostic &Info);
1667
  StoredDiagnostic(DiagnosticsEngine::Level Level, unsigned ID,
1668
                   StringRef Message);
1669
  StoredDiagnostic(DiagnosticsEngine::Level Level, unsigned ID,
1670
                   StringRef Message, FullSourceLoc Loc,
1671
                   ArrayRef<CharSourceRange> Ranges,
1672
                   ArrayRef<FixItHint> Fixits);
1673
1674
  /// Evaluates true when this object stores a diagnostic.
1675
0
  explicit operator bool() const { return !Message.empty(); }
1676
1677
22.6k
  unsigned getID() const { return ID; }
1678
9.53k
  DiagnosticsEngine::Level getLevel() const { return Level; }
1679
27.5k
  const FullSourceLoc &getLocation() const { return Loc; }
1680
2.07k
  StringRef getMessage() const { return Message; }
1681
1682
97
  void setLocation(FullSourceLoc Loc) { this->Loc = Loc; }
1683
1684
  using range_iterator = std::vector<CharSourceRange>::const_iterator;
1685
1686
251
  range_iterator range_begin() const { return Ranges.begin(); }
1687
151
  range_iterator range_end() const { return Ranges.end(); }
1688
879
  unsigned range_size() const { return Ranges.size(); }
1689
1690
664
  ArrayRef<CharSourceRange> getRanges() const {
1691
664
    return llvm::makeArrayRef(Ranges);
1692
664
  }
1693
1694
  using fixit_iterator = std::vector<FixItHint>::const_iterator;
1695
1696
187
  fixit_iterator fixit_begin() const { return FixIts.begin(); }
1697
150
  fixit_iterator fixit_end() const { return FixIts.end(); }
1698
816
  unsigned fixit_size() const { return FixIts.size(); }
1699
1700
662
  ArrayRef<FixItHint> getFixIts() const {
1701
662
    return llvm::makeArrayRef(FixIts);
1702
662
  }
1703
};
1704
1705
/// Abstract interface, implemented by clients of the front-end, which
1706
/// formats and prints fully processed diagnostics.
1707
class DiagnosticConsumer {
1708
protected:
1709
  unsigned NumWarnings = 0;       ///< Number of warnings reported
1710
  unsigned NumErrors = 0;         ///< Number of errors reported
1711
1712
public:
1713
422k
  DiagnosticConsumer() = default;
1714
  virtual ~DiagnosticConsumer();
1715
1716
150k
  unsigned getNumErrors() const { return NumErrors; }
1717
60.6k
  unsigned getNumWarnings() const { return NumWarnings; }
1718
197
  virtual void clear() { NumWarnings = NumErrors = 0; }
1719
1720
  /// Callback to inform the diagnostic client that processing
1721
  /// of a source file is beginning.
1722
  ///
1723
  /// Note that diagnostics may be emitted outside the processing of a source
1724
  /// file, for example during the parsing of command line options. However,
1725
  /// diagnostics with source range information are required to only be emitted
1726
  /// in between BeginSourceFile() and EndSourceFile().
1727
  ///
1728
  /// \param LangOpts The language options for the source file being processed.
1729
  /// \param PP The preprocessor object being used for the source; this is
1730
  /// optional, e.g., it may not be present when processing AST source files.
1731
  virtual void BeginSourceFile(const LangOptions &LangOpts,
1732
1.93k
                               const Preprocessor *PP = nullptr) {}
1733
1734
  /// Callback to inform the diagnostic client that processing
1735
  /// of a source file has ended.
1736
  ///
1737
  /// The diagnostic client should assume that any objects made available via
1738
  /// BeginSourceFile() are inaccessible.
1739
4.82k
  virtual void EndSourceFile() {}
1740
1741
  /// Callback to inform the diagnostic client that processing of all
1742
  /// source files has ended.
1743
79.6k
  virtual void finish() {}
1744
1745
  /// Indicates whether the diagnostics handled by this
1746
  /// DiagnosticConsumer should be included in the number of diagnostics
1747
  /// reported by DiagnosticsEngine.
1748
  ///
1749
  /// The default implementation returns true.
1750
  virtual bool IncludeInDiagnosticCounts() const;
1751
1752
  /// Handle this diagnostic, reporting it to the user or
1753
  /// capturing it to a log as needed.
1754
  ///
1755
  /// The default implementation just keeps track of the total number of
1756
  /// warnings and errors.
1757
  virtual void HandleDiagnostic(DiagnosticsEngine::Level DiagLevel,
1758
                                const Diagnostic &Info);
1759
};
1760
1761
/// A diagnostic client that ignores all diagnostics.
1762
class IgnoringDiagConsumer : public DiagnosticConsumer {
1763
  virtual void anchor();
1764
1765
  void HandleDiagnostic(DiagnosticsEngine::Level DiagLevel,
1766
62
                        const Diagnostic &Info) override {
1767
    // Just ignore it.
1768
62
  }
1769
};
1770
1771
/// Diagnostic consumer that forwards diagnostics along to an
1772
/// existing, already-initialized diagnostic consumer.
1773
///
1774
class ForwardingDiagnosticConsumer : public DiagnosticConsumer {
1775
  DiagnosticConsumer &Target;
1776
1777
public:
1778
1.73k
  ForwardingDiagnosticConsumer(DiagnosticConsumer &Target) : Target(Target) {}
1779
  ~ForwardingDiagnosticConsumer() override;
1780
1781
  void HandleDiagnostic(DiagnosticsEngine::Level DiagLevel,
1782
                        const Diagnostic &Info) override;
1783
  void clear() override;
1784
1785
  bool IncludeInDiagnosticCounts() const override;
1786
};
1787
1788
// Struct used for sending info about how a type should be printed.
1789
struct TemplateDiffTypes {
1790
  intptr_t FromType;
1791
  intptr_t ToType;
1792
  unsigned PrintTree : 1;
1793
  unsigned PrintFromType : 1;
1794
  unsigned ElideType : 1;
1795
  unsigned ShowColors : 1;
1796
1797
  // The printer sets this variable to true if the template diff was used.
1798
  unsigned TemplateDiffUsed : 1;
1799
};
1800
1801
/// Special character that the diagnostic printer will use to toggle the bold
1802
/// attribute.  The character itself will be not be printed.
1803
const char ToggleHighlight = 127;
1804
1805
/// ProcessWarningOptions - Initialize the diagnostic client and process the
1806
/// warning options specified on the command line.
1807
void ProcessWarningOptions(DiagnosticsEngine &Diags,
1808
                           const DiagnosticOptions &Opts,
1809
                           bool ReportDiags = true);
1810
1811
} // namespace clang
1812
1813
#endif // LLVM_CLANG_BASIC_DIAGNOSTIC_H