@@ -312,41 +312,6 @@ class ClangTidyCheck : public ast_matchers::MatchFinder::MatchCallback {
312
312
return Default;
313
313
}
314
314
315
- // / Read a named option from the ``Context`` and parse it as a bool.
316
- // /
317
- // / Reads the option with the check-local name \p LocalName from the
318
- // / ``CheckOptions``. If the corresponding key is not present, returns
319
- // / a ``MissingOptionError``. If the corresponding key can't be parsed as
320
- // / a bool, return an ``UnparseableIntegerOptionError``.
321
- template <> llvm::Expected<bool > get<bool >(StringRef LocalName) const ;
322
-
323
- // / Read a named option from the ``Context`` and parse it as a bool.
324
- // /
325
- // / Reads the option with the check-local name \p LocalName from the
326
- // / ``CheckOptions``. If the corresponding key is not present or it can't be
327
- // / parsed as a bool, returns \p Default.
328
- template <> bool get<bool >(StringRef LocalName, bool Default) const ;
329
-
330
- // / Read a named option from the ``Context`` and parse it as a bool.
331
- // /
332
- // / Reads the option with the check-local name \p LocalName from local or
333
- // / global ``CheckOptions``. Gets local option first. If local is not
334
- // / present, falls back to get global option. If global option is not
335
- // / present either, returns a ``MissingOptionError``. If the corresponding
336
- // / key can't be parsed as a bool, return an
337
- // / ``UnparseableIntegerOptionError``.
338
- template <>
339
- llvm::Expected<bool > getLocalOrGlobal<bool >(StringRef LocalName) const ;
340
-
341
- // / Read a named option from the ``Context`` and parse it as a bool.
342
- // /
343
- // / Reads the option with the check-local name \p LocalName from local or
344
- // / global ``CheckOptions``. Gets local option first. If local is not
345
- // / present, falls back to get global option. If global option is not
346
- // / present either or it can't be parsed as a bool, returns \p Default.
347
- template <>
348
- bool getLocalOrGlobal<bool >(StringRef LocalName, bool Default) const ;
349
-
350
315
// / Read a named option from the ``Context`` and parse it as an
351
316
// / enum type ``T`` using the \p Mapping provided. If \p IgnoreCase is set,
352
317
// / it will search the mapping ignoring the case.
@@ -488,6 +453,47 @@ class ClangTidyCheck : public ast_matchers::MatchFinder::MatchCallback {
488
453
const LangOptions &getLangOpts () const { return Context->getLangOpts (); }
489
454
};
490
455
456
+ // / Read a named option from the ``Context`` and parse it as a bool.
457
+ // /
458
+ // / Reads the option with the check-local name \p LocalName from the
459
+ // / ``CheckOptions``. If the corresponding key is not present, returns
460
+ // / a ``MissingOptionError``. If the corresponding key can't be parsed as
461
+ // / a bool, return an ``UnparseableIntegerOptionError``.
462
+ template <>
463
+ llvm::Expected<bool >
464
+ ClangTidyCheck::OptionsView::get<bool >(StringRef LocalName) const ;
465
+
466
+ // / Read a named option from the ``Context`` and parse it as a bool.
467
+ // /
468
+ // / Reads the option with the check-local name \p LocalName from the
469
+ // / ``CheckOptions``. If the corresponding key is not present or it can't be
470
+ // / parsed as a bool, returns \p Default.
471
+ template <>
472
+ bool ClangTidyCheck::OptionsView::get<bool >(StringRef LocalName,
473
+ bool Default) const ;
474
+
475
+ // / Read a named option from the ``Context`` and parse it as a bool.
476
+ // /
477
+ // / Reads the option with the check-local name \p LocalName from local or
478
+ // / global ``CheckOptions``. Gets local option first. If local is not
479
+ // / present, falls back to get global option. If global option is not
480
+ // / present either, returns a ``MissingOptionError``. If the corresponding
481
+ // / key can't be parsed as a bool, return an
482
+ // / ``UnparseableIntegerOptionError``.
483
+ template <>
484
+ llvm::Expected<bool >
485
+ ClangTidyCheck::OptionsView::getLocalOrGlobal<bool >(StringRef LocalName) const ;
486
+
487
+ // / Read a named option from the ``Context`` and parse it as a bool.
488
+ // /
489
+ // / Reads the option with the check-local name \p LocalName from local or
490
+ // / global ``CheckOptions``. Gets local option first. If local is not
491
+ // / present, falls back to get global option. If global option is not
492
+ // / present either or it can't be parsed as a bool, returns \p Default.
493
+ template <>
494
+ bool ClangTidyCheck::OptionsView::getLocalOrGlobal<bool >(StringRef LocalName,
495
+ bool Default) const ;
496
+
491
497
} // namespace tidy
492
498
} // namespace clang
493
499
0 commit comments