@@ -35,51 +35,59 @@ namespace psr {
3535class PhasarConfig {
3636public:
3737 // / Current Phasar version
38+ // NOLINTNEXTLINE(readability-identifier-naming)
3839 static std::string PhasarVersion () { return XSTR (PHASAR_VERSION); }
3940
4041 // / Stores the label/ tag with which we annotate the LLVM IR.
42+ // NOLINTNEXTLINE(readability-identifier-naming)
4143 static std::string MetaDataKind () { return " psr.id" ; }
4244
43- static std::string ConfigurationDirectory () {
44- return configuration_directory;
45- }
45+ // NOLINTNEXTLINE(readability-identifier-naming)
46+ static std::string ConfigurationDirectory () { return ConfigDir; }
4647
4748 // / Specifies the directory in which Phasar is located.
49+ // NOLINTNEXTLINE(readability-identifier-naming)
4850 static std::string PhasarDirectory () { return PhasarDir; }
4951
5052 // / Name of the file storing all standard header search paths used for
5153 // / compilation.
54+ // NOLINTNEXTLINE(readability-identifier-naming)
5255 static std::string HeaderSearchPathsFileName () {
5356 return " standard_header_paths.conf" ;
5457 }
5558
5659 // / Name of the compile_commands.json file (in case we wish to rename)
60+ // NOLINTNEXTLINE(readability-identifier-naming)
5761 static std::string CompileCommandsJson () { return " compile_commands.json" ; }
5862
5963 // / Default Source- and Sink-Functions path
64+ // NOLINTNEXTLINE(readability-identifier-naming)
6065 static std::string DefaultSourceSinkFunctionsPath () {
6166 return std::string (PhasarDirectory () +
6267 " config/phasar-source-sink-function.json" );
6368 }
6469
6570 // Variables to be used in JSON export format
6671 // / Identifier for call graph export
72+ // NOLINTNEXTLINE(readability-identifier-naming)
6773 static std::string JsonCallGraphID () { return " psr.cg" ; }
6874
6975 // / Identifier for type hierarchy graph export
76+ // NOLINTNEXTLINE(readability-identifier-naming)
7077 static std::string JsonTypeHierarchyID () { return " psr.th" ; }
7178
7279 // / Identifier for points-to graph export
80+ // NOLINTNEXTLINE(readability-identifier-naming)
7381 static std::string JsonPointsToGraphID () { return " psr.pt" ; }
7482
7583 // / Identifier for data-flow results export
84+ // NOLINTNEXTLINE(readability-identifier-naming)
7685 static std::string JsonDataFlowID () { return " psr.df" ; }
7786
7887 static PhasarConfig &getPhasarConfig ();
7988
8089 llvm::iterator_range<std::set<std::string>::iterator> specialFunctionNames () {
81- return llvm::make_range (special_function_names.begin (),
82- special_function_names.end ());
90+ return llvm::make_range (SpecialFuncNames.begin (), SpecialFuncNames.end ());
8391 }
8492
8593 // / Add a function name to the special functions list.
@@ -89,41 +97,44 @@ class PhasarConfig {
8997 // / Remark: Manually added special functions need to be added before creating
9098 // / the analysis.
9199 void addSpecialFunctionName (std::string SFName) {
92- special_function_names .insert (std::move (SFName));
100+ SpecialFuncNames .insert (std::move (SFName));
93101 }
94102
95103 // / Variables map of the parsed command-line parameters
104+ // NOLINTNEXTLINE(readability-identifier-naming)
96105 static boost::program_options::variables_map &VariablesMap () {
97- static boost::program_options::variables_map variables_map ;
98- return variables_map ;
106+ static boost::program_options::variables_map VMap ;
107+ return VMap ;
99108 }
100109
101110 ~PhasarConfig () = default ;
102111 PhasarConfig (const PhasarConfig &) = delete ;
112+ PhasarConfig operator =(const PhasarConfig &) = delete ;
103113 PhasarConfig (PhasarConfig &&) = delete ;
114+ PhasarConfig operator =(PhasarConfig &&) = delete ;
104115
105116private:
106117 PhasarConfig ();
107118
108- static std::string readConfigFile (const std::string &path );
119+ static std::string readConfigFile (const std::string &Path );
109120 void loadGlibcSpecialFunctionNames ();
110121 void loadLLVMSpecialFunctionNames ();
111122
112- std::set<std::string> special_function_names ;
123+ std::set<std::string> SpecialFuncNames ;
113124
114125 // / Specifies the directory in which important configuration files are
115126 // / located.
116- inline static const std::string configuration_directory = []() {
117- auto *env_home = std::getenv (" HOME" );
118- std::string config_folder = " config/" ;
119- if (env_home ) { // Check if HOME was defined in the environment
120- std::string phasar_config = std::string (env_home ) + " /.config/phasar/" ;
121- if (boost::filesystem::exists (phasar_config ) &&
122- boost::filesystem::is_directory (phasar_config )) {
123- config_folder = phasar_config ;
127+ inline static const std::string ConfigDir = []() {
128+ auto *EnvHome = std::getenv (" HOME" );
129+ std::string ConfigFolder = " config/" ;
130+ if (EnvHome ) { // Check if HOME was defined in the environment
131+ std::string PhasarConfDir = std::string (EnvHome ) + " /.config/phasar/" ;
132+ if (boost::filesystem::exists (PhasarConfDir ) &&
133+ boost::filesystem::is_directory (PhasarConfDir )) {
134+ ConfigFolder = PhasarConfDir ;
124135 }
125136 }
126- return config_folder ;
137+ return ConfigFolder ;
127138 }();
128139
129140 // / Specifies the directory in which Phasar is located.
0 commit comments