-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathAV Rule 104.ql
More file actions
32 lines (29 loc) · 1006 Bytes
/
AV Rule 104.ql
File metadata and controls
32 lines (29 loc) · 1006 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/**
* @name AV Rule 104
* @description A template specialization shall be declared before its use.
* @kind problem
* @id cpp/jsf/av-rule-104
* @problem.severity error
* @tags correctness
* external/jsf
*/
import cpp
/**
* A compiler warning that a template specialization occurs after
* what would have been its use. In C++ a template specialization
* only applies after it is defined; if it would have applied had
* it been defined earlier this warning is triggered.
*
* The warning is also triggered if the specialization would have
* made a use ambiguous had it occurred earlier.
*/
class WarningLateTemplateSpecialization extends CompilerWarning {
WarningLateTemplateSpecialization() {
this.getTag() =
["partial_spec_after_instantiation", "partial_spec_after_instantiation_ambiguous"]
}
}
from WarningLateTemplateSpecialization warning
select warning,
"AV Rule 104: A template specialization shall be declared before its use; " + warning.getMessage()
+ "."