-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refs #12842 - added more Python tests for whole program analysis (#6548)
- Loading branch information
Showing
4 changed files
with
151 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
class Base { | ||
public: | ||
virtual void f() = 0; | ||
}; | ||
|
||
extern Base *c1_create(); | ||
extern Base *c2_create(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#include "odr.h" | ||
|
||
#include <iostream> | ||
|
||
// cppcheck-suppress ctuOneDefinitionRuleViolation | ||
class C : public Base | ||
{ | ||
public: | ||
void f() override { std::cout << "1"; } | ||
}; | ||
|
||
Base *c1_create() | ||
{ | ||
return new C(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#include "odr.h" | ||
|
||
#include <iostream> | ||
|
||
class C : public Base | ||
{ | ||
public: | ||
void f() override { std::cout << "2"; } | ||
}; | ||
|
||
Base *c2_create() | ||
{ | ||
return new C(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters